Yes, energy loss in the tracks (or pipes) affects both charging and discharging, so using rails is definitely better than some alternatives. But the problem is that even if the transport process is lossless, the gravitational potential energy stored at the top of the hill is not that much in the grand scheme of things. In this sense it would be better if the force of gravitational attraction were stronger. Maybe we should move to Jupiter?