They were probably in development for a long time, but it was probably way easier to port a shelved wii u version than to optimize a ps4 version for switch. People have been using this game for comparisons, but it isn't a good example.
Like you really wouldn't expect even a Wii U to ps4 version to have much of a difference in the way of polygons. The big performance differences would be on shaders and lighting effects.
When working on so many versions of the game it is going to be hard to keep track of everything. As far as frame-rate goes I'm willing to bet it has more to do with the AI programming causing the cpu to chug. This guy suggests cutting some graphics stuff, but he doesn't know ****. They should program the engine on switch from the ground up and port the graphical assets.
The Switch is actually a good deal more powerful than wii u. In this video you can see the main difference in this game and that game is framerate and lighting. Geometry is pretty much the same. There is some wii u stuff that looks better because of the longer development time. The lighting onthe ps4 is overall superior though. Watchdogs on wii u chugged anytime there was a physics collision. This was because of the slow cpu.
Ps4 is really powerful, but developers are in no way using the system as efficiently as they could. There is some overhead that they won't reach up to because not all programmers were super efficient.
Hyrule warriors runs at a really identical framerate though and has a whole ton more enemies on screen. The game backgrounds are pretty barren, but the enemies are really detailed.
Though Zelda is somewhat of a poor thing to grab framerates from as the action stylistically stops when link hits something.