Just electrify the rail lines. There are strict sizing requirements for train cars such that they can fit through tunnels, so putting wires up just outside this and retracting the pickups for tunnels is perfectly doable. Most locomotives are diesel electric already, so they're not a big shift to convert to battery/electric, with some battery cars for the stretches that can't be electrified. Or just run the diesels for that chunk. It's still a huge win to electrify rail.
Alternatively, just ignore rail for now. It's ridiculously efficient (about 3-4x the efficiency of truck freight). If you phase-in a tax on carbon, more freight will immediately shift from truck to rail because of this comparative advantage... and it will provide incentive for small energy wins on rail, too.
Later, after we shift more cargo away from trucks and remaining trucks become more efficient, we can worry about fully making rail carbon neutral.
(And even then-- can ignore batteries for awhile in favor of just electrification of high-traffic segments).
Mexico and Canada have even more abysmal rates. I guess entire continent of North America was sleeping when the world started doing electric trains.
I always thought that nearly all rail was electrified and have trouble even imagining rails without wiring.
Would electric train be feasible? Could even have entire train cars dedicated to solar panels and batteries.