It is a box designed for electrical wiring. I consider it OK as long as you can't open the cover by the hinges, and that you consider derating if you run all the circuits in one large conduit between the two.

Sometimes it's a more attractive installation to have some 4X4 junction boxes over the old panel for the short wires, and pull the long ones into the new panel.

Dave