You have asked the 100 dollar question, Sorry your going to get the 5 dollar answer from me.

I have done installs of DCC and Sound in hundreds of Engines and equipment and no two are ever the same! Not even 2 of the same model or type! You need to find space anyway you can.

You'll need to do the install step by step, most speakers are too large for Blue Box engines and you'll need a fairly small and shallow speaker in order to fit, The speakers with the large baffles on the back never work.
When I first got into doing installs, I used to use a chunk of soft clay to test for proper clearance for the speaker and decoder.
Isolating the motor from the frame is one of the most important requirements for Blue Box units, Second would be rewiring the pickups to the new decoder to get good power.