Nintendo has had some failures in the past, but I don't see it go away anytime soon.
Each console has its own exclusives, but Nintendo's are by far the most famous, and PlayStation or Xbox owners often buy a Nintendo console just for those games.
And Japan has always been the best place for Nintendo, and by far the worst place for the Xbox line of Microsoft.
Hop on the metro in Tokyo, go to a bar, ride the Yamanote line, get to a random store with electronics and/or games, and I will guarantee you will see at least some people play on their 3DS in public.
Very different from here, where you would exclusively see young peeps play on their smartphones (if you're lucky enough).
Additionally, during my entire time in Japan, the Switch has always been sold out.
No way to buy a Switch, just some games for it.
And seeing Nintendo's history, they were certainly not winning in each generation, but they definitely knew how to make profit each time.
Console sales were amazing during the FC/NES, SFC/SNES and GB, N64 and GBC, and Wii and DS eras, not so much during the GC and GBA, and Wii U and 3DS eras, but at least the GBA and 3DS lines remained strong somehow.
And because the GC and Wii U had such poor sales, Nintendo has released some outstanding games for these platforms.
You can clearly see that Nintendo put way more focus on their games when they saw a given platform won't come off the ground as well as expected.
Now the Switch has some great success, and you can clearly see how Nintendo went back to their lazy selves they were during the DS/Wii era again (all games Nintendo brought to the Switch for this year are Wii U ports, ARMS, Splatoon 2, and Super Mario Odyssey).