Perhaps, but I'd definitely class the Wii U as a misstep - sold poorly and clearly wasn't the right device for the market at that time. I really don't think Nintendo was sure at all what it was doing with the Wii U.
I've seen some theories that the reason the Switch has been so great is that given the relative failure of the Wii U they didn't have time to screw up the Switch with the usual supply of badly implemented software features that Nintendo have a bad habit of doing. Unlike the Wii, 3DS etc there is no step counters, web browsers, virtual console, streaming services, audio recorder, pointless low quality stereo cameras etc at launch on Switch - just a simple, lean focus on fun games. The 3DS and Wii were especially bad for pointless built in extra software. I'd honestly be perfectly happy with my Switch if none of those features, perhaps with the exception of Virtual Console, ever come back.
I also love how Nintendo are really embracing the indie game community with the Switch, a pleasant surprise given the less than brilliant relationship Nintendo has had there in the past.