In order to really fix things requires going back in time. They either should have released the Wii U a year or two earlier, or they should have made it much more powerful. A year or two earlier and a Wii that was effectively on par with the PS3 and 360 would have seemed great. Coming out just a year before the much more powerful PS4 and XBOne made it seem pretty weak. On the other hand if they could have gotten it at least into the same ballpark as the PS4 and XBOne in terms of specs they might have been okay. The PS2 was the weakest console of its generation in terms of power, but it was "good enough" and it was the earliest of the surviving consoles to come out so got a big head start.
Of course the only way they could have aforded to do that however would be to ditch the Wii U tablet controller, which is consuming far too much of the cost per console. It's an interesting idea, and there are some cool things you can do with it, but the evidence seems to indicate that it just wasn't worth it. The Wii was revolutionary when it came out, and everyone else copied Nintendo. With the Wii U it was pretty clear that now Nintendo was the one doing the copying.
Maybe there's some other gimick they could have come up with which would have re-created the Wii frenzy all over again, but a pseudo-tablet wasn't it.
And overarching all of this, they need better third party support. They've needed better third party support since the N64 days, and if anything the problem has only gotten worse. People keep telling them they need better third party support, and occasionally they admit they need better third party support and announce some plan to get better third party support, and yet somehow it never gets fixed. Part of the problem is that they've gotten themselves stuck in a viscious circle, no one expects good third party games on Nintendo consoles (as opposed to handhelds) so no one buys third party games, so third parties judge that making games for Nintendo consoles isn't profitable, so no on expects good third party games... But of course Nintendo isn't helping with their often counter-productive approaches toward third parties. I ahve no idea what Nintendo could do to dig them out of the pit they've gotten themselves into in this regard.
Unless things turn around on the Wii U really soon, the best they can possibly do is have a short generation. About three years from now release the Wii U 2, with better stats than the PS4 and XBOne. (Releasing it two years from now would be better, except they'd risk really pissing off everyone who already bought a Wii U, cf. Dreamcast. A 4 year cycle is short, but not unreasonable.) Make it backwards compatible with the Wii and Wii U, but don't include the tablet controller. The only new gimick i can think of that _might_ go over well would be a VR type system, but then they'd be going up against Oculus Rift. (I'm also not convinved that a VR system would be good for gaming. On the other half i didn't think the Wii motion controller or Wii U tablet controller would be good for gaming, so as far as the market is concenred i'm running about 50/50 on my predictions.)
TLDR: For once actually do _something_ to fix relations with third party developers and release a simple but powerful console three years from now.
Actually, here's another idea. When they announce that future console, make it a joint project with Sega. Even if Sega only had a small share (say, 10%) the news that Sega was getting back into the console business would generate a ton of PR. But that's even less likely to happen than Nintendo getting the next console right on their own.