How do you protect wires from engine heat?
Also asked, can heat damage wires?
The heat doesn't affect the copper conductors in the wiring. They can handle far higher temperatures than those found in attics. The problem is the plastic insulation and jacketing that surround the wires. These are usually rated to withstand up to 194°F, but temperatures that approach this limit are not recommended.
Also question is, how do wires overheat?
Overheating of wire caused by one or more of the previous examples can start the process. Once a wire gets hot, the heat can travel along the wire until it gets to an electrical connection, such as a plug in a wall socket. These ultimately cause a short circuit, which produces more heat and melts the plug connection.
A hot cable means there is a shorting circuit somewhere along the cord, too small of a wire gauge for the load or the cable is plugged into a cross plug socket block. A shorting circuit means there is a partial internal break in the cable causing higher resistance at that point along the cable.