Electrifying tracks can be more difficult than it first seems. For example in the UK on certain lines you have to replace most road bridges that go over the track. The bridges are not high enough to fit electric lines underneath. Tunnels can also have the same problem.
This. The capital costs are huge, such that it only makes marginal sense on a financial basis alone. You get further factoring in service improvements (lighter trains without diesel engines -> faster acceleration -> shorter journey tines), the societal benefits of decarbonisation, and electric trains breaking down less often, but that only moves the viable point so far.
In the extreme case, a railway which is 200 miles long and takes 3 trains a day will never have a positive financial case for electrification. So once you've electrified all the stuff that should have been done decades ago (like main lines with 10 trains an hour) and then pushed on to the marginal stuff (hourly rural lines) there's still a small core of lines left. You could just bite the bullet and electrify them anyway, or you could go with things like battery electric trains (good for short distances off an electric mainline) or biodiesel/green hydrogen. The latter are likely to be cheaper.
Worth testing, anyway, and this looks like a good place to test them.
Hydrogen trains might make sense even if hydrogen cars don't, since the trains run on their tracks, according to a fixed timetable, and need little new infrastructure.
The issue with Hydrogen is its storage technology.
It requires a high pressure (300-bar minimum, 700-bar ideal) environment... or cryogenics to store compact liquid hydrogen.
Building a small, personal, car-tank that withstands 700-bar of pressure and survives typical car accidents is... really difficult? However, building a large train-tank that withstands a typical derailment is far easier.
------
I don't think Hydrogen will ever be useful for personal cars. The pressure requirements / storage requirements look rather insane.
I know there's groups working with carbon-fiber designs and other advanced materials, but those are really expensive. Larger trains / trucks can just use standard steel to contain the Hydrogen at 700-bar of pressure (because a bigger tank is easier to scale).
I mean, Toyota and Hyundai are making personal H2 vehicles.
But they're expensive, very expensive, because those storage tanks are extremely sophisticated. Unless those storage tank costs come down by a LOT, I don't think H2 cars will compete reasonably against other technologies (Hybrid, PHEV, or EVs)
-----
$50,000 for an H2 vehicle with only 180 horsepower engine is really meh.
Some bridges and tunnels are also not electrified in Austria but electric trains still pass through them on their massive inertia alone. It's really not a big issue for trains.
They're doing that more here (putting neutral sections with reduced clearance under bridges) but it doesn't save everything. A major disadvantage of being early to the railway game is that we have amongst the most restrictive structure gauge in the world.
It also turns out that we've repeatedly stopped and restarted our electrification campaign over the last hundred years, such that we have little persistent expertise and excessive costs per km. So it's not just tunnels and bridges.
As a reference point for just how expensive, the Caltrain electrification project in SF is currently estimated at $2.44 billion dollars for 82 km of track, and still climbing. And this is for what's almost a best-case infrastructurally: flat land, few bridges or overpasses, etc. (But, admittedly, what just might the world's worst regulatory environment.)
Midland Main Line in England "cost given as £1.3 billion pounds and also included three station modifications at Leicester, Derby and Sheffield. 422 single track miles of wiring was supposed to occur and a total of 120 bridges modified."
Anecdata: as a regular commuter on the east coast main line in the UK for several years, a very common source of service interruption was blamed on overhead cable problems.
From an engineering perspective the complication of the track electrical infrastructure and pantograph seem inferior to a hydrogen tank and fuel cells. Far less actual stuff to build and maintain.
The East Coast Main Line is prone to dewirement (where the pantograph comes off the catenary and normally gets tangled and brings down the wire) at an unusually high rate. The folk wisdom is that the use of wired headspans instead of rigid portals, combined with a long distance between stanchions, makes it fragile. I don't know the extent to which that's true.
Set against that, the miles per technical incident for electric trains are about twice that for diesel, and a train breaking down on the ECML is also disruptive, if not obviously infrastructural...