Emulators aren't illegal if you have a legitimate copy of the game, and either plug it into your computer to play directly, or transfer your copy to your computer yourself (due to stupid DMCA technicalities, it's not legal to download an identical premade file from the internet). The Switch emulators were shut down not because they were emulators, but because the developers were letting users talk openly about piracy in communities they ran, weakening their we're only providing this for legitimate users and don't want to help pirates defence, and, even more critically, they were sharing each other's dumps of Switch games instead of dumping them themselves, giving Nintendo a we'll sue you for pirating all these games stick to make shut down the emulator project the carrot they could offer in a settlement.
None of this invalidates the point of the post, though, as there are plenty of games where there were never enough copies in existence to cater to the current demand of players, so even if they were willing to spend extortionate amounts for used cartridges on Ebay, people still wouldn't be able to play certain games without resorting to piracy.