The plan in the OP seems technically workable. What I am not so sure is that it would be feasible politically and economically as well. More below.
The big problem is the initial set up cost, that is a HUGE amount of infrastucture work that's going to be needed, road closures, delays etc, all stuff that voters hate. And it would be expensive too. The problem isn't the tech, its the political will to sink billions into doing it on more than just some 'test road' or small area, as to make this worth investing in, you'd have to do it on major national roads etc, otherwise it just wont be worth it.
I thought about the same thing when I read the OP. Setting up a system like this as any significant scale would be very expensive, and on balance I feel that it would only be something densely populated, highly urbanised nations could do. For my own country that has a small population spread out in a big land area, building hundreds and hundreds of kilometers of new overhead lines across wilderness would probably be deemed prohibitively expensive, especially considering the constant need for maintenance. As it is, after a number of big storms in the last couple of decades, there has been a major effort to get rid of overhead power lines as much as possible and to dig them underground. This makes the network much better able to withstandand extreme weather, something that appears to be more commonplace in the future due to climate change.
So, in terms of the costs of the needed infrastructure I can see the system of "trolley trucks" having a chance in (parts of) Germany, or the Netherlands, or, say, even the Czech Republic. But further north and east you go in Europe, the more likely it gets that the government sees that the benefits would outweight the costs.
Outside of practical economy, there is also the question of economic and business policy. Currently, most systems bound to overhead lines for power are limited to single urban areas and run by state- or city-run companies. They are practical monopolies. In terms of the system in the OP, it is also easiest to envision it as a public monopoly. One company to pay for the infrastructure and its maintenance, operate the vehicles and to get the benefits. Much like a railway company, say. But then of course we get to the typical arguments against monopolies. The problem, IMO, is that the system would not be very open anyway, even if they tried to avoid a monopoly. You probably could not avoid the state building and controlling the infrastucture, the initial outlay is that sizable. How would the users pay for it? Either it is paid out of general tax income, in which case the necessarily limited number of operators would benefit, but most taxpayers would not, at least not directly. You could set up a system to monitor the "grid" users and collect the money from them, but that might be a) an expensive system to set up and run in a trustworthy manner and b) if there is no direct government subsidy, a very expensive proposition to the companies using the system if they have to carry the entire cost. Like mentioned above, the constant maintenance of the system would cost significant money on top of building it and on top of ordinary road maintenance. Maintenance would also have to be very responsive in preparation for malfunctions, accidents, storms, sabotage, etc, as the line getting cut at even two or three points more or less simultaneously could conceivably cripple the system for a long stretch of highway.
In any case, adopting a system like this at the early stage of its use, at major scale, you would be tying yourself to a certain standard and either a single maker of the vehicles, or a small handful of them. So, the bigger the system would get, a more of a monopoly you would be handing out to the system provider(s). Everyone wanting to use the "grid" would need to buy their vehicles from Siemens, or whoever the system provider is, or at least have that company (or its affiliates) convert existing vehicles for the system, or order them built to the Siemens standards. And necessarily, these would be trucks for which the best performance could only be achieved in the vicinity of the "grid", they necessairly would be less useful farther away you stray from it. For truck companies operating in much of Europe, sinking a lot of resources to practically serve only in a small part of the continent it might also seem counterintuitive.
What adopting such a system at an early stage would then mean would be to put many eggs in one basket, to gamble on the system being successful. To throw the nation or province to the mercy of technological path dependence. If we talk about Europe, for example, the first nation that adopts the system in a large scale is practically betting on that other nations will follow it as well - otherwise its longterm benefits are less certain. What if, after the system is up and running and billions have been used for the overhead lines, other necessary infra and a system tracking users for payments, etc, an unexpected advance in battery technology, or a new kind of engine, or somesuch, makes autonomous electric trucks again much cheaper and/or practical to build and use? Then you would be either saddled with the Pantograph Truck System for many years to come, paying comparatively more than you would with using autonomous trucks, or you might decide to scrap the system altogether, losing all the investment put into it that far.