I stress over this too because I don't use a car, just a regular bike and my eBike, along w/ a bus if necessary. It's an issue because unlike a petrol engine that you can just top off at a moment's notice, you are going to have to wait and wait to charge your bike. How many of us carry a charger w/ us anyway? Hopefully my new scheme to mount a relatively small and light 6AH battery and wire it in parallel to my existing one will mitigate the range blues.
People say that if the juice runs out you can always pedal it, but maybe not. Pedaling a very heavy eBike up a grade w/ a big head wind? That was bad enough when I had to do that on a light pedal bike. I'd probably call an Uber and hope the eBike fit in it in conditions like that.
Seriously, I never worried about this on my old Currie bike w/ two batteries. When one ran out, who cared?, the other one would get you back, which tells me what the real fix for this is. Everything else (including my aux battery idea) is just a work around.