That would shed some light in another direction.
Now I would suspect maybe some frayed wires in the trailer connector. Maybe a strand of wire from the 12V pin intermittently touching the brake pin.
Another possibility is a defective break-away switch.
Chuck - Sparta, TN
2012 Jay Flight 22FB, 2 x Honda EU2000i
2013 GMC Yukon XL Denali AWD
EDUCATION is what you get when you read the fine print.....
EXPERIENCE is what you get when you don't.