You have a short back at the axles.
Several possibilities here.
The stupid designers of the axles decided it would be a wise idea to run the brake wiring THROUGH the axle tubing.
Bad idea to say the least, the wiring moves about inside the tubing and eventually ends up chaffing the insulation to the point of intermittent shorts like you are getting.
Since you are going to need to run new wire from side to side on each axle it would be a great time to REPLACE ALL the brake wiring. DO NOT run the wire through the tubes! Instead use wire ties to hold the wires on top or on the sides of the tubes or run the wire along the underside of the trailer and drop it at each axle (allow some slack for axle movement).
The manufacturers tend to use the lightest (and cheapest) wiring allowed which typically is 14Ga. While 14Ga can support the current it has a lot of resistance which robs you of a lot of braking power.
I ran two pairs of 10Ga from the tongue to the axles and boy the brakes I have is nothing short of incredible.
Second is in one or more of the backing plates the insulation on the wires managed to get in the way of the mechanical parts and is chaffed.
At the same time make sure you use weather proof splices, RV manufacturers use the cheapest (and fastest) method possible which is Scotch locks or plain crimp splices.
Both are common issues although it seams like the wire in tubing issue is a bit more common..
Do not ground the magnets at the back of the trailer via the frame, the ground wire NEEDS to be run from the tongue to the magnets per Dexter manual..