You still need to account for the discharge efficiency of the battery (which I cannot find numbers for).
For overall energy usage, electric still still has whatever inefficiencies exist in the generator (and charging inefficiency), but those don't effect power density
Transmission costs probably eat a bigger portion of EV total efficiency. Those depend on how far you are from your power source and what voltage your power is transmitted at.
That said, a thing EVs do that ICEs can't is accept power from any source. That means that only a fraction of the fuel is actually generated from a fossil fuel.
One other thing to consider is that as power density goes up for batteries, the amount of required batteries go down, ultimately reducing vehicle weight and improving range.
Assuming batteries were ever 10x their current power density, you'd probably not see cars with 10x range, rather, you'd see something like 400mile range cars with the same total power capacity of yesteryear cars. Pretty much all because you've cut the pack weight down by 1/10th (probably less because you need a lot less infrastructure around maintaining temperature for 1/10th the number of batteries).
Same with electrical generation with generators or whatever. One of the best things about BEV even if run off fossil fuels is that power plants don't care to much about space or weight, they can do multiple levels of heat recovery and whatever emissions controls and get higher thermal efficiency with lower emissions and all that complicated gear is not being carried around in your car nor maintained by you. On top of that now you are decoupled from energy source so changing fuel oil to natural gas or mixing solar, wind or nuclear doesn't change your vehicle.
You have to watch it with fuel energy density since it normally doesn't take into account the efficiencies of converting it to useful work and the equipment weight needed, its just the heat energy released when burned. Electrons probably have a really high wh/kg.
A battery has power leads coming out of it to give you electricity and modern electric motors are above 90% efficiency at converting to mechanical energy.
Diesel needs fuel tanks and a heavy engine and more complicated and heavy transmission as well. The engine itself is probably under 40% efficient at converting those MJ to horsepower.
Same goes for fuel cells they are similar in efficiency to ICE and have weight and say with hydrogen storage you need heavy tanks and protective structure to hold safely. Also with hydrogen it has low volumetric density so even though it has good MJ/kg it has low MJ/L relative to say Diesel. All current fuel cell cars are similar in weight to a BEV and seem to have just a slight range advantage with big power disadvantage. Now look at the efficiency of creating hydrogen at I am very skeptical of it becoming mainstream anytime soon.