Registration fees and taxes are frequently based on weight; and tolls are frequently based on number of axles.
But the relationship between weight or axles and fees is generally linear, while the actual wear and tear on roads is quartic (to the power of 4) in the weight per axle, times the number of axles. If taxes and fees were properly proportional, there would be a much bigger difference in price between a motorcycle and 1 ton pickup truck, let alone an 18 wheeler.
> Do you really want to have to log every mile driven, and submit it to the IRS?
You can use odometer readings that you collect at annual inspections. I realize that not every state does this, but every state I have ever lived in does; you have an annual vehicle safety and emissions inspection, and at that point they can check your odometer too and include that in the calculation.
You could also use the current automated toll collection systems, which are based on transponder or license plate for those who don't have transponders, for highways and congestion charges for cities, if you want to be able to charge different rates in different areas, and just subtract those numbers from the odometer readings afterwards.
Metering EV charging separately does't really solve the problem. Gas taxes are not in proportion to actual maintenance costs of the roads, and are currently a fixed amount, not tied to the price of gas or inflation, so they don't cover the full costs. If you just applied the same kinds of laws to EV charging, you'd be left with the same kinds of problems.
By not charging proportional to road wear and tear, there is an effective subsidy of those who drive larger vehicles, and in particular commercial cargo transport on the highways, by those who drive smaller vehicles. If you were to change the way vehicles were taxed, the larger vehicles would pay more of the burden, which would mean they might switch to alternatives like train transport, or moving production closer to consumption, or the like.
A similar problem exists in cities and on busy highways used by commuters, where congestion is a substantial externality. There it's the square footage of vehicle footprint that makes the biggest difference.