And solar is just one of many ways of generating electricity. Wind turbines continue to work, as do hydroelectric plants (and on a smaller scale, water wheels). Worst case scenario, you can burn more readily accessible carbon based fuels like wood to make steam to generate power. Vehicles that are dependent on extraction and refinement of petroleum are actually quite limited in comparison.
On a side note, you should look up "wood gas". There are YouTube videos of 110v generators running off wood gas, and while it takes a bit of setup, it's within the realm of what a country person could do in a weekend or two.
By weight, I think I remember that it takes 4x of wood vs gasoline to get the same energy. So while a generator takes 6 lbs of gasoline (a gallon) to give you ~5kw, it takes 25 lbs of wood. Sounds bad til you realize how much a tree weighs.
And, ah, during a time of gas shortages, exactly which cars have gas in them just sitting around not being used, and who is going to let you do that to their car?
I can tell you’ve never actually lived this reality, you’re just making stuff up.
I had gas pumps not work due to lack of electricity (and lack of gas in the tanks) on half a dozens occasions in different countries.
You forgot to bring your pump, spotter, and nail-tipped bat. If you had those I'm sure you would have been able to fight your way through and have your go juice in no more than 15 minutes.
Getting fuel out of underground tanks and paying for it are non trivial with no power.
I can charge an EV off my solar panels.