I am sure that we can admit that there are a ton of re-used assets in these games from the Wii U, though. I forgot to mention BotW in that list too. I remember Sakurai say how he could never go through the stress of building another Smash game from scratch like he did on the Wii U. Most Switch owners never owned a Wii U and we got a better game at the end by being able to build off of the assets in the Wii U installment. It was a win-win for Switch gamers but it destroyed the Wii U's legacy as it basically has no unique experiences anymore.
Smash on Switch is a new game. New engine. New lighting. New models. It's a new game.
For Ultimate, because the development company is the same, the know-how wasn’t reset – it isn’t like we forgot how to make a good game in between games. There’s no need to change the game’s “architecture” between handheld mode and docked mode, either. We can re-use assets from the previous game, too – things like that.
There is a reason why Nintendo was able to release BotW, Mario Odyssey, Mario Kart, Smash, Splatoon, Mario Maker all within a window of a little over 2 years on the Switch, while these entries took a generation and a half to get rolled out on the Wii U (last few years of Wii + entire Wii U life cycle). It isn't just because Nintendo got better at developing in HD, Nintendo also finally figured out the art of re-using assets like most of Sony and MS's 3rd parties do on a yearly basis. This never happened between the GCN to Wii and between the Wii to Wii U because these consoles were so radically different in terms of capabilities and gameplay styles. I expect that BotW2 will re-use a ton of assets from the first BotW as well.