The right sized MOV or a RC snubber network across the primary winding of the transformer should help. (Assuming this is a traditional 50/60Hz transformer and not a switching power supply)
Given it's a Weller soldering iron, I can only imagine they already took care of this, but maybe some components inside have expired.
But it's pretty old. I've heard of snubber capacitors and I've heard of capacitors drying out. Would this be a thing to open it up and look for?
Well, if you find that replacing the USB cables with good quality ones doesn't solve your problem, I'd definitely open it up and have a look. No harm in having a peak for a burnt out MOV, etc...
I had a look. There's nothing on the primary side between live and neutral except the switch and the transformer.
I could potentially do something about that, I might even have the needed bits around, but I know nothing about this and it involves mains voltage.
I think I'll go look for an alternative. I have another soldering iron, which isn't great, but will hold up while I find an alternative.
Along with the other USB cable that'll hopefully solve it.
Would have been nice to know what caused it, to know for the future.
While the unshielded cable is a good guess, I can't really be 100% sure that was it.
But I think it's better to not experiment and potentially fry another KVM or USB hub.
If the issue crops up in some other form, I'll come and revive the post or make a new one,
but for now, thanks for the help guys.