Why not just tax gas? It’s the perfect solution. The more you drive, the more you pay. The more polluting your car, the more you pay. Long term it seems inevitable that tax will need to move onto the electricity used to charge cars.
I'd like to think it's because EV proliferation makes the gas tax too regressive but I'm not that good at lying to myself.