Yes, though they can go even further than they did on Switch 1. Switch 1 docked is only about double the handheld specs. They could in theory go with an even more expensive and powerful chipset, something like 4.5 tflops (about Xbox Series S tier) when docked but only like 1.5 tflops (about SteamDeck tier) in handheld mode. They just have to be willing to pay for a chipset that powerful and design a good docked cooling solution to make sure it doesn't overheat, some extra fans on the dock itself that feed cool air into the handheld air intake should do it.
Would likely result in the dock, being akin to how it is now + a wire that goes to the box part that holds the extra hardware.
So the dock would be a bigger thing. Also if Nintendo spends like 100$ extra on the dock, to give it hardware (say half the GPU is in there, otherhalf inside the handheld part), and that would drive up the total packageing price for a Switch 2 by those 100$ then (might be a small price to pay to double the GPU performance).
The "easy" road, is just to make the Switch 2, the same way they did the first Switch.
The CPU+GPU just clocks up higher when docked.
Maybe the hope should be that include good active cooling in the new dock instead? so they can push cpu+gpu abit harder when docked?