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