Harry's CoS letter from the Improper Use of Magic Office states
We would also ask you to remember that any magical activity that risks notice by members of the non-magical community (Muggles) is a serious offense under section 13 of the International Confederation of Warlocks’ Statute of Secrecy.
We know that The Trace tracks magical activity around Underage Wizards, and hence can (theoretically) catch 'Improper Use of Magic' by wizards under 17 (though as we also see, it has a huge bunch of loopholes). We also learn in DH, that the Trace can not be placed on adults.
So how does the Ministry catch "serious offenses under section 13 of the International Confederation of Warlocks’ Statute of Secrecy" when the offender is an adult?
ETA (to clarify): This question is not about 'how does the Ministry track offenders in order to punish them' but about 'how does the Ministry track offenses (as mentioned in OP) in order to correct/clean up after them'.