That must have been overheating for a while.
Looks like the contact was making por connections and causing arcing.
... poor quality connectors.
Even the contacts that hadn't melted were showing signs of overheating.
The wire going to the neon indicator was also charred and damaged.
Looks like the surge protection module was also causing overheating.
The insulation on the blue neutral wire was also sliced through by being trapped under the earth rail.
Here we have thermal fuses (the translucent components), metal oxide varistors (blue discs). This is a very basic surge protector circuit found in extension cords.