The declining gas tax problem is going to get worse as electric cars increase in popularity. The solution is comprehensive road pricing, where a larger share of the real costs of road infrastructure and parking infrastructure are borne by the users.
The added benefit of correctly pricing driving is that people will make more informed decisions about where they live and how they get to work, that will result in more compact communities and less urban sprawl.
Another option would be pricing by weight. Big trucks currently get giant subsidies from the rest of us, just measuring by how much they damage the roads. Fixing that would probably drive up the costs of many goods that are transported by truck, although it would also probably cause a redistribution of which goods are sold, to favor lighter or more local goods. In any case, it would keep the roads in better condition. On the interstate near where I live, it's often a 10:1 ratio between trucks and cars.
This might become more tenable if long-haul trucking gets automated, as it almost certainly will. Take the expense of hiring a human driver out of the equation, and registration costs for semis could be an order of magnitude higher, and still cost less.
Big trucks do pay a substantial road use tax. I don't know the specifics, but they don't get to drive for the same cost as the passenger cars. On toll roads the trucks pay a lot more too.
The added benefit of correctly pricing driving is that people will make more informed decisions about where they live and how they get to work, that will result in more compact communities and less urban sprawl.