I have an in-wall space heater in a wall can that recently started smelling of burnt plastic, and when I opened it up, I found that one of the wires had come loose from the wire nut, and the weak connection had overheated and melted the nut. I cut away the burnt parts, restripped the wires, and reconnected them with new wire nuts, but I wasn't paying much attention to the length of the wires, and now one of the wires is too short to properly affix the heater unit where it sits in the can.
Is it safe/up to code/otherwise reasonable to extend the wire with appropriately-sized in-wall NM-B or stranded appliance wire? Several other questions here have answers covering splices in inaccessible areas like behind drywall, but I can't find anything about what applies in wall cans. In addition to pure code compliance, arguments about the sanity of replacing a failed wire nut with two wire nuts are also welcome.
Possible alternatives that aren't great:
- There is no service loop to work with (based on how it feels when pulling on the cable), so I can't just pull more cable through.
- Replacing the whole cable would be difficult to coordinate, as the cable goes to a wall switch on a circuit that has devices that are a PITA to power off, so turning off the power to do the work would be a hassle (and I'm not confident I can work on live wiring safely, so that's also out).