There needs to be a way to identify and extract the funding from the users of the roads. The existing paradigm of gas tax made perfect sense when a person needed to buy the fuel necessary to operate the vehicle on the road. Even if the purchase was made in one county, and the driver immediately left the area on the freeway, it was balanced by another driver essentially doing the opposite. Everyone got their fair-ish share of the taxes, and the roads were maintained. (Some much less so than others, I agree.)
So what to do now? With the move to electric, and plugging in your car at home, the need for stopping at a gas station is dramatically decreased. Even hybrids, which still use gasoline, don't use much. My solution is technologically feasible, but probably will not appeal to a lot of privacy advocates.
My solution is to equip all new all-electric cars with a transponder that activates when the car is moving, and tracks and reports miles driven and where. Using GPS, every mile driven on every road in every county is tallied, and a "use tax" can be applied to that car. I see the DMV tracking the data, and apportioning out the funds to each county on a monthly or some other regular pay period. Agreements would necessarily be established between states (or set it up at a federal level) so that interstate trips would be accounted for as well.
As a user, I would be making regular payments to my road-escrow account, similar to how I pay for gas now. If I don't have any money in the escrow account, the car gets bricked - unable to move. Much like the situation now if you can't afford to get gas. Yeah, about that privacy thing. Everywhere you drive will be tracked and logged. It'll be a treasure trove for law enforcement (Who was in the area at a particular time? Subpoena the database.) Though if you currently use a cell phone, it already can be.
I'm sure someone smarter than me will figure out something better, or ways to improve on this, but hey, let the mind wander when out running!