If I were you, this would be my solution:
1/ Observation: The trailer circuitry lost GROUND somewhere.
...a/Re-ground the trailer i.e. sand the bolt to the shiny bare metal, tighten it and...GREASE it.
...b/ Have 2 connectors in hand ( brand-new, doesn't cost much ) One for trailer connector, other for towing vehicle connector. If the first step couldn't solve problem, replace trailer connector. If proceeding second step, the problem still exists, go on and replacing towing vehicle connector. I positive think the issue will be gone. If you are good @ multimeter with basic electrical
knowledge, you wouldn't need to replace with new connectors. Just my personal opinion....and..I COULD BE WRONG. Please post your result. Thanks.