Mask with "Coordinates from object"
You can make a pass-trough node that is able to mask with a transparent shader all the geometry outside box object.

Basically you pick up the box coordinates, take the part outside the (-1,1) range (which actually depends on the box scale factors) of each components, sum all the contributes and assign to that a full-trasparent shader. The pass-trough masking node must be assigned to every material of the scene.

Notice that you can even scale the cube in different axis and it will still work as expected (never apply scale to the cube, or you'll lose this property).


The only limitation is that the proces is based on math, not geometry. The cube only help to better see the cutting boundaries, but there is not a true dependency (it would work even with an empty, what really matter are the object's coordinates and scale).
In this case the math behind the clamping is quite simple: it will consider only the object's bounding box. With some effort you should probably be able to build fror example a sphere/ellipsoid mask, a torus mask,... and even more complex shapes (you can sum the contributes of several individual masking objects).
If you would like to smooth out to the boundaries of the selection, just substitute the "Greather than" math node with a color ramp for each channel.

Almost infinite implementations could follow, as far as your math knowledge can support you
Here's another example with a spherical falloff:
