> For trains, we would have to build out the transmission lines, not sure this works as well for passenger trains vs freight (much heavier), also an even longer turnover time.
It's just money, really.
In practice, you tend to build overhead lines once it becomes economic. This is pretty much just based on line usage; I think the normal rule is that anything over two to three passenger trains an hour per direction, the economics favour electrification.
Some DMUs and diesel locomotives can be economically converted to electric; most diesel trains these days are actually diesel electric anyway, so it's a matter of removing the engine and adding pantographs.
For shortish lines, you can even electrify before you roll out the overheads! Dublin's remaining diesel commuter lines are currently being electrified, and one of them (or possibly two) will use battery-electric trains until the overheads are fully in place (expected to take a while due to old bridges etc); they'll operate on overheads where they exist and battery elsewhere.
(The first one should start running mid next year; I'm really curious to see how it goes.)
This can be taken to ridiculous extremes. The new trains for the Dublin<>Belfast route will have diesel engines, _and_ batteries, _and_ will support running on 1.5kV and 25kV overheads. 1.5kV while they're on the Dublin suburban network, then diesel to Belfast, then battery within Belfast; the 25kV is to support the future Irish intercity standard.
All that said, battery electrics are probably unsuitable for freight; you'd really have range issues there.