And btw Super Mario 64 DS is a remake of SM64 with more playable characters, not a port.
On the Wii you just connect a GameCube controller (first or third party), problem solved.
And since the controller layout of the GameCube is very similar to any other modern controller (Xbox controllers, DualShocks 1 - 4, Wii U tablet controller, Wii U Pro controller, Switch Pro controller, Switch Joycons...), I'm sure Nintendo would figure it out to make Super Mario Sunshine HD compatible to the different Switch controllers. If users of emulators can do it, Nintendo can do it, too.
The Super Mario Galaxy games already officially support normal game controllers on the Nvidia Shield console... so there would also be no problem for Nintendo to port them on newer Nintendo systems like the Switch. Additional the JoyCons have motion controls, so a Switch version could offer both input methods.
The "heavily link" between 3D Mario games and their original hardware and controllers are much less important than you suggest.