I had a similar problem on my 2005 HR Next Level Toy Hauler. One day while towing home from storage, I lost all my trailer lights and electric brakes. After taking it to a local RV shop for repairs, they traced it to a bad ground. There was a stud that was welded to the frame and it had multiple grounding wires on the stud. The nut on the stud had loosened causing the problems. Cost me $80 for the fix. I would check ALL grounding areas, both at the battery and all frame contacts.