If you want hard numbers, SBB used 1685GWh for passenger trains in 2025 [0].
The bigger problem with this idea is solar in Switzerland. It's fantastic during the summer but close to nonexistent during the winter [1]. Trains need to run year-round, so you'd need to overbuild solar monstrously to power SBB during the winter, or you'd need to solve seasonal electricity storage, which isn't easy. Pumped hydro is great but Switzerland has already built about as many artificial alpine lakes as the population is likely to tolerate.
[0]: https://reporting.sbb.ch/en/sustainability?=&years=5,6,7,1&s...
3000kw is about 1/2 power for the most common Swiss electric engines.
And peak demand determines grid size.