Check for intersection if yes then hide

I'm looking for a way to monitor an object and if it intersects/crosses with another then it must hide.
It cant check the bounding box as the objects are changing shape.

If you look at the gif, basically I want to procedurally hide the boxes on the inside when they become to small to fit.

Any help would be appreciated. Thanks

AttachmentSize
intersect-hide.gif32 KB