I decided to dissect my fusebox after replacing it for a known good one and curing the problem to see exactly what had gone wrong for future reference, and also because rather frustratingly I had read all sorts of nonsense written elsewhere about what goes wrong with these fuseboxes.
My old fusebox with failing headlights circuit, sidelights come on randomly, no headlights, full beam ok (common issue)
The fusebox
The headlamp relay socket
The laminates that make up the fusebox are damp with signs of oxidation.
This is the outer cover removed, here is the area directly behind the headlamp relay
Rivets drilled out and all laminates separated
More corrosion
Opened out like a book
Fully opened out and separated
There was no physical damage to the metal tracks but 2 were shorting behind the headlamp relay due to the melting, they could be repaired though by insulating if needed.
.
Whether the damp caused high resistance and melted the relay holder is not known but if your headlights have the symptoms described above or similar then this could well be the issue