Edit: I missed "electric tankless". Also, heat pump water heaters happened.
Heat pump water heaters completely change the game
The economics are insane. They are tanked heaters but they use typically 1/4 the electricity for the same heat, and are such a tremendous cost savings that they pay for themselves in a few years.
So where do they get the other 3/4 of the heat? They steal it from the room. This is either a blessing or a curse, depending on how you feel about a bunch of entirely free air conditioning in the utility room. For instance in the hot south or southwest, it's a no-brainer. But in winter you may be running primary heat more to replace that lost heat. But usually that primary heat is much more cost-efficient than resistive electric heat, so it's still a net win.
Electric tankless is a brute, though
My rule of thumb is 40 amps per GPM you want. GPM is a measure of flow, it means "gallons per minute". This is a monstrous load on a panel. So it really depends on what panel capacity you have vs what GPM flow you need. 90% of the time, this is not a pretty picture and requires a very costly electric service upgrade, and that's where that advice comes from.
I mean if nothing is done to manage GPM draws, some houses can draw 5 GPM from a water heater and you're talking 200 amps to power that.
But GPM is the key: a lot can be done to contain GPM, simply by not using the default non-California wasteful plumbing fixtures. Heck, the Europeans have "electric showers" that draw 35-45 amps! Barely 1 GPM at that point, but it works for them.
If you can contain GPM rates, and then either find the panel capacity or use Load Management, then absolutely, electric tankless can be a player.
Gas tankless, on the other hand, doesn't prevent an electric problem but might present a gas flow problem if your gas service isn't ready for it.
"Enormously more expensive" is silly.
Right off the bat, he's throwing out the baby with the bathwater: heat pump water heaters are expensive but very worth it, unless you have an irreconcilable problem with keeping the utility room warm.
Gas tankless are expensive too, but a fantastic solution.
And electric tankless are dirt cheap - as discussed, the issue is the electrical provisioning if nothing else is done to contain GPM flows.
So if he's making that as a blanket statement, he is just plain wrong. I would suspect an ulterior motive, and you probably don't want to start that conversation LOL.
New technology works better when you're smart.
Many new technologies are vulnerable to being applied in a klutzy and inefficient way that makes them not work well at all. That's where, again, skills pay the bills - and people without skills get frustrated trying to make new technologies work.
One example of a sizing issue: Adding a low-flow showerhead can allow use of a much smaller heater, which can mean running much smaller cable.
With on-demand, you might use more
This means the middle person in the shower who used to have to hurry to leave the last person anything at all, doesn't hurry anymore. The last person can take the time they need. That extra use is a true luxury you now have, but it's not free.
Crossing over from gas to electric may add energy cost
Since electric energy starts as heat, and only 33-40% makes it into electric energy, it's an inefficient way to buy heat. When you burn your own natural gas, you get 80-90% of the therms in your water. So, X therms of electric is generally more expensive than X therms of gas.
Unless you heat-pump it, of course.
It's not only about cost: convenience is worth it.
We are affluent Americans. We have money for conveniences. On-demand does some amazing things:
Unlimited hot water. This is huge. Especially if you have a family showering.
Quick hot water. With electric, you don't need a vent, and the unit is not large, so you can position it near the point-of-use. That means hot water in seconds, not minutes. What's your time worth? What's the water you flush down the drain worth? And that plays well with the European "electric shower" concept of put the tankless right at the showerhead.