Wii U isn't a bad console per se, I like it more than the original Wii in a lot of ways, Nintendo just screwed the pooch in trying to chase after the magical controller idea.
Strip out that giant monstrosity of a gamepad and put that extra hardware budget into the chipset and you'd have something reasonably more powerful than a 360/PS3. While it wouldn't outsell the PS4, I think Nintendo would've had a fairly good chance to outsell the XBox One and get by with a decent no.2 showing this gen.
Instead they went with a system far too close to the PS3/360 and tried to hit the controller craze jack pot again and ended up with a total disaster on their hands. It's a shame, because games like Mario 3D World and DKC: TF are legimiately terrific, though perhaps Nintendo deserves some flak for not trying enough original IPs.