Petrol/gasoline 44-46 MJ/kg Diesel fuel 42-46 MJ/kg Crude oil 42-47 MJ/kg
You're already near far denser volatile chemicals, even if it isn't you driving someone else is somewhere.
TnT or nitroglycerin is much more dangerous in spite of much lower energy density because the energy is all in the TnT.
Of course this isn't the only consideration (the fact that TnT releases nitrogen which suddenly wants to be much bigger is important, for example), but it is a reason to hesitate around such a battery and carefully consider whether you want to throw it around at 100km/h.
EVs are much safer both in absolute numbers and relative numbers (if you consider there are far less EVs than ice vehicles). They do occasionally burn of course. And usually those fires aren't very explosive and give you plenty of time to get out of the vehicle and to safety. Fatalities/injuries are rare with this.