(2) You are wasting time pushing objects into the selection set.
This is not necessary in order to modify them.
(3) Instances do not "own" any nested components. Definitions own nested objects.
So you should be collecting a set of IKEA definitions, and then searching the definitions entities collection(s) (in that set,) for hidden objects.
When a definition has a child object that is hidden, it will be hidden in ALL of the definition's instances.
When you delete a hidden object from a definition, ALL of it's instances will have that child object deleted.
okay, a dedicated C side Ruby book is also now available: