electric showerheads, by contrast, provide instant heat, and they provide it for as long as you care to shower. what they don't provide is hot water in the sink for washing dishes, unless you take the dishpan to the shower to fill it. and if they're incorrectly installed they can be deadly, but that's a pretty rare problem both with hot-water tanks and with electric showers. i've never talked to anybody who knew anyone killed by an electric shower, and the nature of electrocution is that it's unlikely to injure you without killing you
(tankless hot-water heaters, called calefones, are common here in argentina, and they also solve one of those two problems—the other one. rooftop evacuated-tube hot-water thermosiphon hot-water heaters are also somewhat popular here)
i think that, aside from dishwashing, the main advantage hot-water tanks have over electric showers is that historically natural gas has been much cheaper than electricity. since chinese solar panel producers have driven the cost of solar panels down by a factor of 20, that's not necessarily true anymore—but the intermittency of solar-energy production favors hot-water tanks, if anything, even more strongly
apparently electric showers are common in the uk, which is not a poor country: https://news.ycombinator.com/item?id=41250251 but with much better safety measures than i'm used to seeing in latin american countries
the entire house is on a single anemic 25-amp circuit breaker. at a low-flow 6 liters per minute (100g/s) heating from 15° to 40° (Δ temp = 25 kelvin) at 4.2 joules/°/gram, you need 10.5 kilowatts, which is 44 amps at 240 volts. at 120 volts just forget about it
i have had a super cheap non-tankless electric shower in a couple of places i've lived in argentina, which sucked. you would fill it up with water, plug it in to start heating the water, unplug it half an hour later to stop heating the water (hopefully before it overheated), and then open the valve at the bottom to run the shower. dangerous, inconvenient, and uncomfortable
on the other hand, if you're building an apartment building in brazil or a hotel in costa rica, there's nothing stopping you from including an 80-amp circuit in every bathroom for the electric shower. it's definitely cheaper than a hot-water tank or a tankless heater, and it might be safer too, since it might allow you to avoid running gas to the room
Do these countries not have any limit on the current in a circuit? Over here we're not allowed more than 16A in residential use and that's over 2.5 mm^2 wires. What kind of conductors do they use in Brasil for 80A circuits?
You can only heat water so much for the available wattage and when it was cold the water was so cold that only a thin trickle could be heated to a comfortable showering temperature.