This is a very common phenomena
Interesting to hear ideas and solutions.
First, there are what are called, "current carrying conductors". These are the actual "power wires" that do the work. In North America we use what is called "split-phase", which is a reference to how the transformer on the pole taps into the higher voltage supply wires that feed a neighborhood.
A split-phase transformer in NA supplies 3 current carrying conductors - two 'hots" and a neutral. Bridge across from either hot to the neutral and you get 120v, bridge across from one hot to the other and you get 240v.
Two wires are all that you need to have power.
Then, for safety, just purely as a redundant backup, we add an extra wire - the "equipment grounding conductor", which is properly called "EGC", but commonly referred to as "ground" or earth", since there is usually some place where the EGC is connected to the planet (but there doesn't actually have to be a connection to the planet for the "power wires" to work).
The EGC ties the metal parts (breaker box housing, metal conduit, microwave chassis, etc.) of the equipment together, and when done properly, is connected to the neutral of the transformer. In this way, if either of the current carrying conductors should come into contact with the metal parts, it provides a nice low resistance path to the transformer's neutral.
If a hot wire should come into contact with some metal connected to the EGC, it creates a dead short that should (hopefully) trip a breaker.
If a neutral wire should come into contact with some metal connected to the EGC, then it won't necessarily trip a breaker, but still provides a low resistance path back to the transformer's neutral.
Either way, the EGC helps to protect people from ending up as a current carrying conductor.
Now, since the firemen who are the "keepers of the lore" (they write the electrical codes) in the U.S. are true "belt and suspenders" kinda guys, they require multiple redundant paths for this redundant backup. So we connect the EGC to neutral in the main breaker box, and also connect it to the incoming cold water pipe, and just for icing on the cake, we also connect to rods driven into the ground OR connect to the rebar of a concrete foundation.
Sweet, sweet redundant safety.
But for the EGC to ever actually carry any current, there has to be a screwup somewhere. If the power wires are done right, they never touch anything connected to the EGC.
Again, a hot touching anything connected by EGC will normally trip a breaker, but a neutral touching often won't.
And there's the rub...
So assume some dodgy setup somewhere. May be a campground, may be some outbuilding in the South American outback. They've probably got some connection to the planet somewhere, maybe at the main building, or at the transformer. Something. But no EGC, or maybe a half-assed kinda/sorta might or might not work so-called "ground'.
And somewhere in all this hokey wiring, a neutral is making contact with some metal somewhere.
Along comes Mr. Happy Camper and plugs in. He thinks he's done everthing right when he wired his camper, because he connected his on-board EGC to his truck's chassis.
But unfortunately, there is that dodgy neutral somewhere upstream. Then he hops out in the middle of the night to take a leak, barefoot. When he touches both the planet and the truck, some electrons that have been fighting their way past a dodgy neutral connection somewhere on the property, suddenly discover that it's easier to get back to the transformer by going through the truck chassis, then through a human body, then through the planet. So they do, and Mr. Happy Camper gets a cheap thrill.
But! If Mr. Happy Camper had NOT tied his on-board EGC to the truck's chassis...he never would have become a conductor.
By "grounding" the on-board high-voltage AC electrical system (connecting on-board EGC) to the chassis of the truck, this potential is created.
By then hard wiring the truck chassis to the planet by connecting to a driven rod, or a metal plate under a tire or whatever, you do create a bypass so that your own personal body doesn't become a conductor, BUT you also make it possible for your truck's wiring to potentially end up having to carry more load than it was designed for.
So grounding the truck to the planet is not the proper solution to the problem and should never be done.
IF the shore power has a proper EGC then your truck's high-voltage AC system will be connected to it when you plug in a 3-wire extension cord. If the shore power doesn't have an EGC, or only a 2-wire receptacle to plug in to, then your truck's high-voltage AC system should remain a "seperately derived system" and not connect to anything except the the two "power wires" of the shore power.
Q. But what about the current leakage? How do you prevent Mr. Happy Camper, or his dog, from a latenight cheap thrill?
A. Ground Fault Circuit Interrupter. Plug that into the shore power 2-wire and plug the truck into that. The way this doohickey works that they run the two current carrying wires through two ceramic inductive coils, and compare the two. Under normal circumstances, the two power wires will carry the exact same current. It's balanced. But if there's a leak, say neutral to ground, then one wire carries more current. There's an imbalance, which is rightfully assumed to be a fault to ground, and the device trips.
(The name of this doohickey is deceptive, because it implies that it does something related to "ground". It doesn't. The name should probably have a colon in it to eliminate confusion. I.e., "Ground Fault: Circuit Interrupter".)