You can still use "pick top" condition from the z order while using a family.
So no need for any complications, make a family with both objects in it and than set the code for that:
->on touched object "family1" and family1|pick top --> family1 | destroy