Have you tried?
The marginal cost of driving an existing truck 10 mile down an existing road is negligible. Getting electricity to a place that is even half a mile from the nearest place that currently has electricity can be incredibly expensive and time consuming. Even just applying for the right permits and getting the go ahead from the local power company to start pricing out the job can take months.
Of course non-existent wire vs existing road is not competitive.
If both exist, electricity wins. If neither exists, electricity wins. And electricity has that added advantage that you can buy an equipment that will produce it in place without consuming additional resources.
The only case where fuel is competitive is when roads exist, electricity distribution doesn't, and diesel generators are installed.
Are you sure? I'm not. Especially not when we're talking the sort of electrical infrastructure that can support charging multiple electric cars and trucks (although there's no point in having an electric car if there aren't any roads).
Obviously electricity is the right long term answer and where we should be going, but I doubt it is the cheapest immediate solution in many parts of the world.
Wires never blow a tire, head gasket, or transmission - and in fact they cannot even crash into and kill people on the highway. They're just long pieces of copper or steel tied to a tower. How convenient!
If you instead compare the fixed costs, as you seem wont to do, you'll find that HV (500 kV) transmission lines and towers capable of carrying several gigawatts [1] continuously have substantially lower initial and lifetime costs per Joule-kilometre than oil pipelines, rail, trucks, tankers, or anything else that has to move oil. [2]
[1] https://www.power-technology.com/features/featurethe-worlds-...
[2] https://www.forbes.com/sites/jamesconca/2014/04/26/pick-your...
Compare like with like please.
Transportation of (flammable) liquids require either vehicles (and hence roads or rails if you go inland) down to the last mile. Electricity requires a wire, which is far less costly to build.
Also if you consider the logistics of bringing energy to different places of a building, wires are much easier to lay down than pipes.