Well batteries don't magically go dead but give you accurate information on how much range you have. In a traffic jam, EVs are super efficient. They don't idle; they just switch off. And they are also really good at generating loads of torque at low speeds. Probably a heavy electric truck is way more efficient than the diesel equivalent on a steep incline in a traffic jam.
Going downhill, electrical trucks actually regenerate energy. 40 tonnes is a lot of potential energy. So, if you do get stuck in the mountains with a nearly empty battery yelling at you long before it dies, turning around is a valid option.
Finally, this is a bit of road that is very challenging for ICE trucks. There's a slow lane, escape lanes, etc. Trucks breaking down, catching fire, etc. is a very regular event. They are well prepared for it. Thanks to decades of ICE trucks breaking down on this route.
And of course mobile chargers are a thing in emergencies or just when a lot of power is needed somewhere. Just put a container of batteries on a truck and you have a nice mobile charger. That's already quite popular for installing temporary charging infrastructure at events.
I don't see any advantage to having a diesel truck in such situations.