Just because you're not participating in those events doesn't mean you're not enrolled in them. With Full Marks, you're sorted into a group the very second you finish loading into the game. With House Pride, you get a slight delay - you don't get placed into a group unless you've earned a few House Points from things like story events, study sessions, etc.
The problem isn't whether or not you get caught specifically. If you or anyone else in your FM/HP group gets reported for suspicious behavior, Jam City will silently audit the accounts of everyone in your group. As soon as they find any discrepancies, subtle or not, you get banned within a few days. You could be super careful during a multiplayer event, but if some other dumbass in your group decides to go full ham with their cheats, you're still getting banned. It's pure luck, really. And if you really care about your account and not grinding through the main quest, we strongly recommend that you don't play at all during multiplayer events.