Wouldn’t it be more energy efficient to just electrify the line rather than charging & hauling around batteries? The technology has been around since *checks notes* the late 1800s.
Hydrogen has a major efficiency problem. Unless the electricity to create the hydrogen is practically free (i.e. grid price is zero, you're turning off generators) it's not worth it. You're at like 30% round trip efficiency whereas batteries and overhead lines are well above 90%.
Using hydrogen also prevents regenerative braking, which is one of the big advantages of battery or overhead electric.