Seems to me if I had that problem, I'd start looking at the wires in the trailer female plug, male plug and making absolutely sure the blue wire running to the trailer brakes doesn't have bad splice joints. Then assure yourself that the ground wires are clean and tight.
2016 Newmar Dutch Star 4369
Newmar Owners Club
USAF 1966-1969,- Law Enforcement 1969 - 2003, Retired since March 2003