Nintendo has a lot of money, a failure of a home console after Wii U probably would kill their home console division (no reason to continue making products if they all fail), but it wouldn't kill the company as a whole, in particular they would keep making handheld consoles.
Since Sony has entered home console market, Nintendo was essentially unable to compete with them. Nintendo 64, GameCube and Wii U weren't successful compared to PlayStation. Wii and Switch on the other hand succeeded by doing something completely different to what PlayStation did.