Once the cable insulation has been damaged in this way, replacement of the damaged section is the only acceptable way to repair this fault.
Due to the number of different causes for this problem, it is important to identify which is responsible and repair that issue BEFORE simply replacing any cable.
Loose connections may need tightening & quite possibly the accessory/switchgear replacing if it has become damaged also.
Undersized cables will need the correct calculation completing and either the load reducing or the cable uprating to suit. According to Your Electrician Gold Coast, undersized cables and poorly calculated circuits are the number one cause of thermal damage.
In areas where external heat has damaged the cable insulation, it may be that the cable needs rerouting away from sources of heat or that specific cable for use in areas exposed to higher temperatures is used.
If the issue is only confined to the connection end of the cable, simply removing a section (assuming there is enough spare) and reterminating may suffice. Be aware that the damage can often go much further than appears on the outside of the insulation, effectively “melting” the inside of the PVC insulation to the copper cable.
Unfortunately quite often replacement of larger sections of cable may be necessary. This being either due to the damage itself or as the cable with the damage removed is now too short.