You can use the family only to sort Z order.
If there are many many objects, but the order can be constraint to ordering around a few 'key' objects, you can pre-pick those objects.
Example with order needed only around the player. (player is also in the family)
Give player the Line of Sight behaviour with a reasonable range.
Give the family a family instance variable 'ground'.
(Player) Has LOS on (family)
____For each (family)
_________Set family.ground to family.y
____Empty event
_________System > Sort Z order > Object = family ... Instance variable = 'ground'.
You can also pre-pick those that are on screen
Is on screen (family)
____For each (family)
_________Set family.ground to family.y
____Empty event
_________System > Sort Z order > Object = family ... Instance variable = 'ground'.