Wow that really sucks. I mentioned in the past that you should be okay on Club Tortimer from hacks affecting your actual save, but I guess there's more to it. You should take precautions if the hacker seems to be doing anything malicious.
If you do encounter a hacker and don't feel comfortable then leave. If they are doing anything that's malicious or unwanted, disconnect the system the moment it signals a banner for the game to save. (Arriving, leaving, tour, or just saving, etc)
And one last thing, not everyone that hacks the game is mean. Some people do it to giveaway items, I know couple people who's soul reason they still play New Leaf is for that reason. But there are, and as with any other hobby, people that use them for stupid reasons. So please refrain from making any arrogant comments that's generalizing the subject with one adjective.
Also, my personal rant, Nintendo really should have stuck some anti-cheat in New Leaf.... Pokemon has it. I just find it so confusing that they didn't think ahead. Because there's always going to be those handful of pricks ruining the fun for others.
I mean, at what point does your player ever drop a rock legit? It should have had a detection online that disconnects the session... But they didn't do that. I really hope Nintendo vamps it up with Animal Crossing Switch. Because I do not like seeing people having their experience ruined by someone misusing hacks.
But I'm sorry to hear that you had a bad experience like that.