This website contains age-restricted materials including nudity and explicit depictions of sexual activity.
By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.
There’s little chance of that happening, but even if there was, they’d just use batteries for the acceleration phase. That’s what hydrogen fuel cell trains do anyway, because the fuel cell can’t produce enough power on it’s own to accelerate the train from a stop, so they’re used to charge batteries that allow it to do so.
The reason why there’s little chance of that happening is there are already very many cargo trains powered by overhead lines. We’ve been doing it for 150 years and in continental Europe there are many sections of track that are entirely electrified because it made more economic sense than running a wasteful (compared to a steam power plant) diesel generator to power the already electric engines of the trains.