The gamepad was a mistake, but had that been the only thing wrong with the system then developers would probably have just mirrored the TV's output to the gamepad screen and called it a day. Likewise, the whole kerfuffle about the console's name was something Nintendo had been through before with the 3DS; they'd turned it around there, and they could probably have done so with the Wii U.
No, the thing that really doomed the system was the hardware choices. I can't remember any other console from a major manufacturer where the hardware design was just so inexcusably bad on every conceivable level. The GameCube proved that developers would port to a Nintendo platform in cases where it was quick and easy to do so (at least until the storage space of its mini-DVDs became a limitation), but the fact that games originally developed for the 360 and PS3 often turned out worse on the Wii U was frankly a total joke.