In what way was that code editor malicious? Did it allow i.e. creating your own games, modifying other games etc? I don't think so, since I'd expect apps on such platforms to be totally sandboxed. If you could only enter data into it via a keyboard, you couldn't even use it to download programs off the internet, except doing it the 80s "let's retype those ten pages of code into my computer" style.
This hasn’t been the case for any previous Nintendo console. Xbox does use HyperV to silo games from apps, but we’ve never heard anything about Nintendo doing something similar.