yeah, the Switch has a few security features, including their browser not supporting JIT compilation, which is how a lot of web exploits work. It's also running webkit, which is the same underlying browser that most phones and computers use.
Also, Nintendo also has on their end a kill-switch: if they find out something in the browser is exploitable, they can force disable it until the next system update. In homebrew circles, this message is called the super nag (displays when trying to launch the browser):
89beb05911bd177679ce0d19e341dcd7.png
In the past, this has been used to prevent PegaSwitch from working. It should also be noted though that even when this happened, there wasn't a virus that was maliciously targeting Switch web users, only homebrew users using it to hack their devices.
here's what PegaSwitch looks like when it activates (only works on older Switch firmwares):