I'm going to go out on a limb and say that the Switch will go out with a relatively strong lineup of games as they introduce its successor, and will not suffer the fate that is being questioned. It has had a storied and remarkable existance. Hard to believe now, how many predicted it not to hit as much as 30m lifetime.
The WiiU suffered from the start. Marketing wasn't done well and had many thinking it was a gamepad add on to the once greatly loved, but then passe' Wii. Sales were initially strong, then dropped sharply and the 3rd party support launch lineup came, went and nothing followed. As much as I enjoyed the experiences WiiU offered, I don't think it ever gained enough userbase, game library, or active years to claim it suffered unfairly at its end.
Gamecube, while a strong player technically with its internals, had a similar fate as WiiU, albeit not near as bad.
I believe that the console that suffered the worst, and most unfairly, in it's twilight years was in fact the Wii. For as hugely popular as it had been, and the sales it achieved over its many years in production...Nintendo itself moved on and imo, abandoned the console while trying to prepare for the next machine. I can't come up with any major releases that stick in my mind, in the consoles last year to year and a half of its life cycle. It just sat there, with a massive amount of units sold...floundering in silence, with no support from even its own creators. A sad end for a machine that had remarkable marketing, envious sales and a strong library of games.