The Switch does well because it's a bunch of things that your smartphone isn't -- bigger screen, better controls, and also a home console that connects to your TV -- while still being small enough that it's easy to slip into a bag you might be carrying.
They have, for example, OG Gameboy sized consoles with enough power to emulate everyting up to about PS1/Gamecube: https://anbernic.com/products/rg35xx
Emulation is a thing now, and small third party hardware makers are filling the niche. And at the other end phones have more power than even the Switch has. That's why the SteamDeck or ROG Ally are on the bigger side. Betting against the smartphone is a losing bet.
I never play my Switch undocked and all I can think about is how much beefier the internals could have been if they hadn’t made it a dual use device.