The difference is that, at least in North America, the N64 succeeded in achieving massive mainstream appeal. If you were a kid in 1997 and you had an N64 in your house, every kid on the block wanted to come over. If you were a kid in 2013 with a Wii U, most of your friends would roll their eyes and go back to their smartphone.
Games like Goldeneye, Star Fox, Smash Bros, Mario 64, Ocarina of Time created massive popularity and hype and made the N64 a household name for at least the first half of its life. Even though the Wii U had some great games, Mario Kart 8 was probably its biggest title from a popularity standpoint and it faded from memory after a month or two.
What really kills the Wii U though is how its legacy got cannibalized by the Switch. Nobody is going to remember that Splatoon or Mario Maker were Wii U games because most people will have played these games for the first time on the Switch. Very few people 10 years from now will think back to their childhood and remember the Wii U fondly like people today remember those sleepovers in the 90's playing Goldeneye with their friends. I would argue that the Wii U isn't even as impactful as the Dreamcast was despite selling more units just because so many of the special experiences that the Wii U had have been completely recreated and enhanced on the Switch. The Wii U's legacy was destroyed in order to make the Switch a success.
The problem with this post is that it does not describe reality. Was N64 popular with kids? Of course. Every Nintendo console is popular with young kids. That includes the Wii U. Kids did not roll their eyes at the Wii U. (Everyone else did, but young kids did not.) The issue Nintendo has is getting people other than young kids to like their console. Also the N64 did not have massive mainstream appeal. It was, at best, tied with the PS1 in North America. And that was during it's best years which did not last. Also people still liked games like Mario Kart 8 and Smash Bros on Wii U. But this was not enough to get people to buy a Wii U.
And I am not saying all of this because I think the Wii U was great. I am saying all of this as a reality check on the N64. So much of what you describe as great about the N64 also applies to the Wii U. Maybe this is not really why the N64 sold better than the Wii U? Nintendo had a huge amount of positive momentum going into the N64 generation. The name Nintendo was synonymous with gaming in those days. The Wii U did not have that kind of positive momentum. Other than that the N64 is not really that different than the Wii U. Although the Wii U gamepad was even worse than the N64 controller. One positive the N64 had is that it's controller was less terrible. Other than that it's main advantage was Nintendo as a brand. Nintendo's name used to be a lot stronger.