Helsinki did the same thing but storing the energy in water instead of sand:
https://helsinkismart.fi/worlds-largest-cavern-thermal-energ...
replies(2):
Collecting heat from wast water is free energy. When you defecate, wash clothes or dishes, or take shower there is warm water and solids going down the pipes. That heat can be used. In the summer stored cold sea water can provide district cooling.