https://www.moderndescartes.com/essays/factobattery/
Using the above methodology, I ran numbers for a desalination factobattery and it's really bad, like two orders of magnitude more expensive than just buying a Li battery to buffer the unreliable energy and running desal 24/7.