This article ... https://www.thetruthaboutcars.com/2015/07/save-manuals-give-... ... is from 2015, but says that the M4 couple was 83:17 in favor of the automatic gearbox; and I doubt things have gotten better since then.
Automatic gearboxes (whether torque converters, CVT or dual-clutch) have just gotten much better to the point where they're better for both performance and fuel economy.
Manual transmissions are much, much harder to integrate with any kind of hybrid system, stop-start system, power-off coasting etc. which help with fuel economy too.
But you are right in that as cars electrify manuals will be less and less common. Not to mention emission regulations are pushing manufacturers to only produce autos
Manuals are still better in some rare situations imho like off-roading where just not having to worry about trans temps is a win
Not necessarily disagreeing, but just wanted to say that it certainly is possible. I rented a manual Renault (don't remember the model) a couple of years ago and was surprised how it had a stop-start system power off when coasting system.