If I understand your issue right, you need to pre-comp your box (as it appears before you try and scale it) and then once it is pre-comped and all nested together in one comp. In the original comp you should be able to scale the pre-comp you just made without running into the z scale problems. Try that and let me know if that fixes it. Also, to make sure you maintain the quality of the original object(s), make sure you tick the “Collapse Transformation” box so that when you scale you don’t lose quality.