Norway I believe it was has also had energy positive mining trains for awhile as they mine up in the mountains, load it up, and bring it down to the coast using electric generators for brakes.
I wonder that in certain parts of the world, the train network could become net positive electrical contributor by mining stones in quarries up the mountain?
Depends on what you measure, I guess? Ie I don't think you have enough excess energy to pay for the actual quarrying itself. (Though you might be able to become energy positive if you take water as a ballast, not stone. Water is easier to pump into some tanks.)
Well inner mine transport can be net positive as well with electrical mining trucks. Then you need the energy for explosives and stone cutting, which needs further investigation, whether this can be offset by the energy gained of the stones travelling downhill. Water should be better used for hydroelectrical production.