When I worked at Ørsted, we did this all the time. We had a huge electric kettle, which we used to produce district heating water.
But there are many more things you can do with surplus energy. You can make methane gas from pure CO2 and hydrogen when you apply electric power as a catalyst.
The methane can then be eaten by bacteria to provide protein powder to be used as supplements to feeding livestock.
Or, we can yank CO2 out of the atmosphere and store it as ethanol. I think this was discovered last year or so? Ethanol is a really good "battery", and it only discharges as much CO2 as was captured by the surplus energy used to make it, making it a clean fuel that only exhausts CO2 and sterile water.