Trains would not be battery operated and have no risk of spilling the toxic battery components. They'd be powered by third rail or overhead wires. That is how most pure electric trains are powered today already.
The battery concept is kind of dumb and a relic of IC engine thinking. For local urban journeys you could half-size the cars, provide common power, and add automated navigation to optimise density and efficiency.
Getting rid of batteries would hugely lower cost and weight.
Cross-country is a different problem, of course.