As far as I know there are limited ways to prevent nintendo from seeing your activity online, none of which are in any regards useful if you wish to use online at any moment.
One is to block certain domains from your internet modem, this however will not allow you to access any online service, the other one is to turn off the Wi-Fi, as you can see you are as good as banned if not worse if you opt for any of these, but hey, they "work".
There are however ways to minimize your chances, these have not been tested and probably won't do much in reality, but are worth a try imo. Use 3nds (I forgot the actual name) for any homebrew app (although some are still buggy) and refrain from playing any non-official VC game. Do not cheat heavily online, tbh I have cheated online (nothing big, just some trolling) and I've yet to be banned, however, NEVER play online with an unreleased title, those will make nintendo NNID ban you, which is much worse and as far as I know, only a few select people know how to lift.
Here's also a funny little trivia... (I guess) if you use any of the public seeds available, if you go online on Smash, prepare to enter "For Glory Hell" it seems that "place" is linked to the seed, as I've always been there since I changed my seed.