Occasionally it is necessary to replace original factory wiring inside a unit. Sometimes critters have nibbled on them, sometimes the weather has degraded them, and sometimes the overheating or failure of a connected component has made the wire stiff and brittle. Whatever the reason, it is important to note that all wiring must meet the original manufacturer factory specification. Of course you should replace the original wire with the same material and gauge, but there is more to the specification than just the actual wire.
The wire insulation rating is just as important. For example, a wire from an NM-B cable should never be used to replace power wring inside a unit even though it might be the same material (copper) and gauge. The wiring inside most equipment is rated as machine tool wiring (MTW). MTW insulation is a thermoplastic that is rated for up to 600 volts and is moisture, heat, and oil resistant. The insulation on NM-B cable is not moisture, heat, or oil resistant.
The wire insulation rating can be found printed or embossed on the wire. The figure below shows the marking.
Note that the wire gauge can be seen in the yellow circle and the insulation type, MTW or THHN, can be seen in the green circles. You should check to make sure any wiring you plan to use inside a unit meets the manufacturer’s original specification. This specification can often be found in the wiring diagram notes. A common note is that any replacement wiring must be rated for a temperature of 105°C. The insulation of NM-B cable is only rated for temperatures up to 60°C, and so should not be used inside the equipment cabinet.