Emulation is legal but emulators that circumvent the DMCA in order to function are not. Yuzu and Ryujinx both decrypt encrypted Switch content using prod keys and title keys in order to execute it. The act of decrypting switch games in real-time using those keys is a violation of DMCA and is illegal (in countries that care about the DMCA anyhow). Having code in your emulator that CAN decrypt the Switch content can be viewed as a DMCA violation as well, even if it also supports unencrypted content.
Based on that, it seems like all we need is for Ryujinx/Yuzu/some other switch emulator that hasn't yet been sued by Nintendo to be built in a way that it requires decrypted copies of the software and they could then argue that the person who violated the DMCA was the person who released the decryption tool or the teams that release decrypted versions of switch software.
Seems like if the developers remove the need for the emulator to use prod keys or title keys and they can remove the primary DMCA violation that is being weaponized against these emulators.