That's exactly what my problem is ...
How do you expect to increase userbase significantly by releasing the same IPs ? For 3D Zelda and 3D Mario we have BotW and Odyssey respectively, 2D Mario/Zelda already has overlap with the customers of the 3D games ... (you could potentially sell more hardware with a new Zelda and Mario Kart since the first releases on the Switch were shared with the WII U but even that install base is already transitioning to the Switch bit by bit everyday with other games releasing for it thus lowering potential to sell new hardware in the future)
This is heavily flawed reasoning. It's like saying that, because Uncharted 2 was a direct sequel to Uncharted, only people who played the first will buy the sequel. Clearly, this did not happen, as the sequel sold better than the original.
The overlap of people buying games of the same IP is not 100%.
Just getting one generation of a new Pokemon game is enough to get a high rate of saturation on hardware sales gains but getting a second Pokemon game to have the same effect to a significant portion would mean that the Pokemon IP would have to undergo some growth in the same generation but that just breaks precendent from what we know so far (Gold/Silver sold less than Red/Blue on the GB, FireRed/LeafGreen sold less than Ruby/Sapphire on GBA, Black/White sold less than Diamond/Pearl on the DS and Sun/Moon sold less than X/Y on the 3DS, practically all second iterations of Pokemon games sold less than the first release on the same platform so I don't see the logic behind a second iteration having the same effect to the magnitude of selling the hardware)
First of all, FireRed/LeafGreen weren't their own generation. The GBA only had one generation of Pokémon games based on Ruby/Sapphire.
Second of all, it's quite premature to declare that Sun/Moon sold less X/Y when Sun and Moon released less than a year ago and are still on the market. According to Nintendo's financial reports:
Pokémon X/Y: 16.15 million (+40k)
Pokémon Sun/Moon: 15.67 million (+230k)
The difference is less than half a million, and Sun/Moon will only close the gap from here.
Finally, you're still making the assumption that every single person who bought Sun/Moon also bought X/Y, but that's not how sales work.
From my personal experience, some of my friends only ever bought Omega Ruby/Alpha Sapphire, and not either of the main games. Similarly, some of my friends got X/Y and ORAS, but not SuMo. And some of my friends bought a 3DS in 2016 just for SuMo.
Games of the same IP can have different audience appeal. I know it may seem strange from our enthusiast perspective, but most people don't buy every single game in a series. SuMo pushed 3DS sales, and it's easy to see this because the 3DS was actually up year-on-year in 2016 according to Nintendo's shipment data.
Well that's just it, Nintendo's B-list is only as big as it's flagship ...
Nintendo can try to ride it out with Metroid, Fire Emblem, Luigi's Mansion, Donkey Kong, Mario Party, Yoshi and Kirby but then soon enough Nintendo will face the problem of needing new IPs to grow hardware sales or having the IPs themselves grow (rare) ...
Mario Kart 8 Deluxe has sold 3.5M copies so far and Splatoon 2 is a full sequel to the previous game and I can't understand why you're discounting that the sequel wouldn't be able to also sell new hardware to the majority of it's previous customers until the next sequel comes out ...
You say no shortage but all we've been doing is not taking into account how much overlaps will factor in too ... (It's not going to be necessarily a bad thing that Nintendo can't sell more hardware either when they can depend on selling more software to established install base.)
40M units sounds like it's obviously in the cards at this point but by the end of 2019, we'll have seen the majority of what the most the Switch already has to offer with existing IPs ...
If the 3DS is about to pass 70 million on the strength of the IPs I listed, in what world is the Switch going to sell only 40 million despite being better hardware with better software support? The Wii sold 101 million and the DS sold 154 million because of Nintendo's support, and that was when they had to split their resources in half. Now they don't even have that handicap. They could put all of the 3DS + Wii U IPs on Switch and still have plenty of time to spare for new IPs.
It seems to me that the reason you're so pessimistic is because you personally don't like the Switch. I don't have an issue with you having your own preferences, but it doesn't make sense to base your predictions on your feelings instead of on observable reality. The reality is that the Switch is experiencing a wildly more positive reception than the 3DS, outperforming it in the same timeframe in both sales and game library. The Switch's advantage in game library will only grow with time, so it is only logical that the sales lead will increase as long as stock allows it. This year will likely be close thanks to the parts shortage and Nintendo's conservative production capabilities, but next year the Switch will leave the 3DS in the dust. Nintendo could make 26 million Wii consoles and 30 million DS consoles in a single year. I don't know if the Switch will reach quite those numbers, but it doesn't need to. All it needs is a full, six-year lifecycle.
I don't remember who first used this kind of progression, but it sums up the situation perfectly:
Imagine Splatoon on 3DS.
Imagine Pokémon Diamond and Pearl on Wii.
Imagine Ocarina of Time on Game Boy.
That's what the Switch is.
As Rol has so eloquently stated, time will prove me (and him) right.