Well I've not really managed to get very far with a script yet. Sometimes you just need to get on with a task and trudge through. The stack system works ok but as soon as you go to the bottom editable poly to do work on the mesh the stack is obviously set to the base object. If you turn toggle end result on that works, but…
A ProBoolean might also work, it might be a tiny bit faster if you run into viewport slowness issues. A ProBoolean might be preferable too because it will cut the faces and remove them cleanly based on the bounds of the box, instead of hiding just what is fully inside, if you have some big polygons in the scene and a tiny…