You are referring to a hydraulic accumulator[0], such systems were built in the 19th century. There is a modern effort to use the technology in a massively scaled up fashion by Heindl Energy[1]. Their concept uses pumped water to raise a rock weight 100 meters or more in diameter.