Maybe it’s different in the rest of the world (I doubt it), but the fuel nozzles for gasoline and diesel are different. You can’t put a diesel nozzle into the opening on a gasoline car, so it’s rather difficult to fill a gasoline car with diesel fuel.
The other way around is possible. You can fill a diesel tank with gasoline. Whether it destroys the engine or not depends on how much gasoline you put in. A gallon or two that is then diluted by filling the rest of the tank with diesel is not likely to cause any lasting damage. If you fill a tank 3/4 of the way with gasoline and try running it in a diesel you are probably going to need a new engine.
So yeah, the analogy is not good. Slightly exceeding the rated voltage and breaking the whole thing is usually not the same as putting a little gasoline in your diesel tank.