I think the right strategy for charging a locomotive battery pack would be to install a short section of 25kV catenary at the station/layover facility at the end of the route. Amtrak has some HHP-8 locomotives which are 8000 horsepower, about 5 megawatts, which demonstrate that carrying about 5 megawatts through a catenary system to a locomotive is not terribly difficult.
Recharging will take longer than refuelling a diesel, but if the recharging can be done in under an hour, that's probably tolerable.