You're not wrong that fuel does sometimes catch fire but it is very rare for a fuel leak to cause a fire on its own. It usually happens after a fire starts elsewhere.
Fuel system integrity in crashes has been scored in crash tests for a very, very long time (I recall reading about it when I was reviewing some microfiche with crash tests results of 70s pickups) so OEMs have been trying to build secure fuel systems for a long time and have gotten pretty good. With cross flow cylinder head designs (which every engine today has) there is no reason (it would be a waste of material to plumb it) to have fuel on the same side of the engine as the exhaust. The routing between the engine and the vehicle body basically always (i.e. I know of 0 exceptions but can't prove one doesn't exist) go out of their way not to run over exhaust. Fuel systems rarely have gasketed connections, almost everything is sealed with O-rings.
Mature EV designs probably catch on fire less than ICE designs but not really for any of the reasons you specified. Fuel fires mostly come from crash damage to fuel tanks where the crash also leaves the vehicle overturned. Most fires come from electrical systems not related to the drive-train. Even engine fires are rarely fuel, animal nesting debris is a far more common cause.
Many, I think, mostly maintenance related. Frequent causes involve old gaskets or cracked fuel lines dripping onto the exhaust manifold, right on the side of the engine.