I’ve never liked electric hot water heaters, since a lot of energy is lost in transmission from the generating source. Propane or natural gas provides heat right at the source and seems a better choice. And of course, solar is king, if you’ve got it together. I have a solar-heated outdoor shower, but haven’t got around to solar-heating all household water. I’ve made an exception to electric water heating with this little 2-1/2 gallon hot water heater that goes under the sink of our office kitchen. It has a switch that I turn on for maybe an hour, then turn off. The water temperature can be set with the thermostat. The tank is well insulated, so it stays hot for hours. It seems a very efficient use of electricity.
In the house, we’ve had a 5 gallon electric water heater under the kitchen sink for about 15 years. It’s minimal in electric power usage, and doesn’t waste water getting from cold to hot (in pipes coming from a more distant water heater).
And yes, I’ve got to get more of our water heated by the sun. It’s on my list of things to do, honest.