This kind of ban only makes sense with dense electrical and infrastructure penetration. Good luck convincing people in the country to give up four wheel drive and switch to a vehicle where fuel cannot be stashed.
So in many countries, there's this thing called "park and ride", which allows people to park on the edge of the city and catch a bus in instead of driving their vehicles into the city. That's a more than suitable solution to the problem of people outside the city needing gasoline-powered vehicles while the city bans them.