I need to splice several Romex wires in my house. Can I use an electrical box the size of a breaker box (empty)to bring several circuits in for splicing? The box would be within a few feet of the breaker box and is needed because some of the old circuits as well as some new ones have to be joined. This is on a remodel and about 1/3 of the wires are not being replaced, but need to be spliced with new wires. The old Romex cables are of current code, just a bit too short to make it to the breaker box that is about 4' away
Yes, that's fine. I do it myself. I bought some 10x10x6 boxes for splicing some wires that had been cut short by copper thieves, and also to house relays for some lights.
You can also connect the box(es) to the service panel by lengths of EMT conduit (which is exactly what I do). This takes care of grounding. You are only allowed 4 circuits per conduit (unless the conduit is <24" long), so in the case of my big 6x10x10 box, I ran 4-6 conduits between box and panel.
For simpler jobs, my preference is to run a 1/2" or 3/4" conduit to either a 4" or 4-11/16" square junction box (much cheaper at the electrical supply than the big-box store). Then I bring 4 circuits into each box. For the last hop from box to panel I use stranded THWN-2 individual wires, which is easier to work with and is legal in conduit. (the reason not to use stranded THWN everywhere is it's hard to attach to receptacle/switch screws, until you get the knack).
These boxes are also nice places to mount GFCI deadface or receptacles if you want to protect a whole circuit, but don't want to spend $40 for a GFCI breaker.
You need 4-1/2 cubic inches per pair of non-ground wires spliced. So one 120V circuit needs 9 cubic inches, and a 120/240 split phase circuit needs 13.5 c.i. You also need one 2.25 cubic inch allowance which covers all ground wires. I use 4-11/16" boxes (or 4" square boxes with extension boxes) for the necessary cubic inches; (42 c.i. and 22+22 c.i. respectively).
check with a licensed electrician
Are you talking about re-using an old service panel box as a junction box? It certainly seems safe and sane. I bet there's nothing in the NEC about using a breaker box as a junction box. Anything about re-using materials just says they have to be suitable and in good condition.
Just be aware that an installation can be perfectly code compliant and still cause the inspector to go into momentary cardiac arrest.
follow volume restrictions
NEC section 314.16 specifies the box size required depending on the number of wires, connections, devices, etc. contained. If you web-search "NEC section 314.16" you'll find the relevant code text and lots of advice about how to calculate your minimum box size.
Example link: https://www.ecmweb.com/code-basics/box-fill-calculations
If you're re-using the previous service panel from the same location, it is certainly big enough to contain fewer cables than before.
clamp wires where entering box
Don't neglect to clamp each old and new Romex cable where it enters either box. Use the proper clamps -- there are several types of clamps that look similar.
close off unused holes in reused box
If you re-use a junction box, don't leave any of the knockout holes open. Don't improvise, you can buy properly sized covers at an electrical supply store.
use proper wire nuts
Wire nuts are sized for the wire gauge and number of conductors. You conductor count will usually be two but you may have several wire sizes.
join with same size wire
Speaking of wire sizes: for each wire or cable that you extend to reach its breaker, make sure the hookup wire is the same size as the extended wire. In other words, don't splice different gauge wires together.
You would think that it's safe to just use the largest size wire for all the splices. Well it won't melt or burn up, but it may be confusing to future maintainers, especially someone who looks only in the new breaker box and not into the extension box. That's why the NEC doesn't allow the conductor gauge to change in the middle of a circuit.