I have two tankless water heaters in my place. I love them and they work well, but I don't know that they are perfect for a darkroom. Maybe the electric ones would be okay, but mine are gas and won't turn on until there is a minimum flow of 1/2 gallon per minute. Below this, it's cold. If you need just hot, this works, but if you need warm water (cold and a little hot) for washing prints and such, you're had.
A small electric under the counter might work better and is certainly cheaper. You can buy a 6 gallon and this might be fine. Just turn it on only when in the dark. Maybe someone here has tried this.