Transporting refrigerated goods over moderate distances and last-mile delivery from the train yards are where trucks using overhead cables can shine.
I also read that there existed trolleybus lines that went several miles/kilometers between towns that weren't connected by rail. It's especially useful in mountainous terrain.
For trucks on the highway, it is a much better idea, but for many of those cases, you'd be significantly better off investing in more rail.