The 50 amp breaker mentioned is near your batteries. It's a 12V DC mini-circuit breaker covered by a red rubber boot. There are usually 4 or 5 or 6 of them together in a row, joined by a copper plate on one side. The copper plate distributes power from the batteries to each of the breakers. The other side of each breaker feeds 12V DC to things like electric slides, hydraulic pump motor, and a few other things. I've attach a couple of pictures. The breaker in question should have a teeny-tiny reset button on the end and will typically have 2 thick wires attached. Sometimes the row of breakers is mounted horizontally, sometimes vertically. The arrangement of breakers varies, so don't get caught up in the specifics in the photo. Look for the thick wires.
The intermittent nature suggests that either the breaker between batteries and fuse box is intermittent, or perhaps it's something else. If while on shore power everything works without any interruption, but when shore power is disconnected, it's intermittent, that argues the problem is in the path from batteries to fuse box, or perhaps with the battery ground through the cable attached to the negative battery terminal. A loose or corroded ground could easily account for your symptoms as the fuse box grounding is separate from the battery grounding. That means one could work reliably and the other not so much.
Trace the cable attached to the negative terminal of the battery to where it connects to frame ground and ensure good, clean, tight connections.