A few melted spots in headlight harness

Im redoing my harness and have spotted a few dimmer connectors that have shown some heat damage. Also the wires are usually stiff/damaged. I plan on replacing and possibly upsizing the wires.
As to the reason why.....multiple reasons, but 1 I think that hasnt been mentioned is our dimmers are on the floor under carpeting. I believe any moisture gets trapped there and causes shorting. Also our clumsy feet knocking around the dimmer probably doesnt help.