Just went through this myself last month...
For the past year or so, I was occasionally getting the same warning on my F-450 dash display: WIRING FAULT ON TRAILER
All of the lights were working... and when I'd test the brakes, they seemed to work too. I chalked it up to something in the main pigtail box under the kingpin from when I'd crushed it a few years back.
Well then, coming out of Death Valley to Lake Tahoe a few weeks ago... I noticed it was taking a little longer & more effort to slow down on steep downhill grades, and coming to a stop when going thru towns. Tried squeezing the paddles a few times to test, and had no resistance at all. Thankfully the weather was nice, and all roads were dry. Was going to get them checked in Reno... but just before pulling into the campground there, I tested the paddles again, and the brakes worked fine.
Leaving Reno a few days later, they worked fine again. Ok, musta been a glitch, I figured (hoped?). Well, as you can guess... got about halfway across northern Nevada, and tried testing them again. Squeezed the paddles... nada. No brakes again.
Got into Wendover on the Nevada/Utah state line, and tried to find someone who could check things out... but, while there were plenty of diesel mechanics, none who wanted to play with trailer brakes. Began calling places in Salt Lake City 2 hours further east, and got an appointment.
Rolled across the salt flats relatively easy, and got into the shop. I was hoping it was just a ground wire or something... but, turned out to be a bit more involved. It took the guy awhile, but he eventually found the issue. After checking the wiring, and then pulling the wheels... mechanic found (and showed me) frayed bare wires in 2 of the brake assemblies... and badly worn magnets on 3 of them.
Bottom line... all new brake assemblies on both axles (4 units), and a big bite out of my wallet. Can't really complain though... 6 years & over 40,000 miles of near full-time use, and that's really the first major mechanical issue I've had on the road. But, now they all work.