By any chance, is the wiring in your trailer aluminum? If so, you should know that aluminum wire can compress with age and loosen, and in certain cases might corrode at the terminal. That might explain the "on again off again" nature of your complaint...
It's easy to determine if the wire is aluminum: open up the receptacle as Zeppellinium describes above, and look closely at the wire. It will be a solid wire and silver in colour if it's aluminum. Copper is plainly much more yellow.
If you think it is aluminum, and even if it -appears- to be tightly held by the screw, take a screwdriver and try tightening a bit more. That might be all it needs to get going again. I would also recommend that you do the same at the breakers: make certain that all screw terminals with aluminum wire in them are nice and snug.
Caution, do not overtighten, there is a risk that the wire could break, necessitating its removal from the screw terminal, stripping off more insulation, then carefully re-attaching it to the terminal.
In any event, I would have a qualified trailer tech look at the wiring. It's no fun not being able to count on having power when you need it. If it's aluminum, it should have the correct type of terminal, marked for used with AL and CU, and it's up to a pro to ensure that was properly done.