Still. Back to the original point. Enforcement - How?
You can't ban all aftermarket parts. Among other things, it's not fair to owners of older vehicles for which like-new-condition original parts aren't available. It also won't work. An original-equipment but rusted-out stock muffler is still noisy.
You can't just require that EPA marking (or e-marking) on all parts. Doesn't solve the problem - if someone wants to be noisy, they can cut open an original muffler and rip the guts out and carefully weld it back together preserving that marking. If the only requirement is the marking, it's there. If there's a prohibition against tampering, prove it at the roadside without unreasonable detention. Good luck.
The "noise snare" and similar devices won't work properly, because sound is not very directional and is strongly influenced by distance and the surroundings, including other sources. (IIRC GreyGhost is a sound engineer)
SAE J2825 was intended to be a reasonable and quantifiable standard for assessing motorcycle sound (there's a similar standard with a different number for other vehicles). A number of municipalities including Caledon have bylaws based on that standard. That standard makes reasonable allowance for vehicles that aren't in brand-new condition and have reasonable aftermarket parts - doesn't have to be strictly OEM, as long as it meets the requirements. Seems fair ... OEM equipment in good condition always passes, aftermarket parts that are "decent" pass, straight pipes and stylishly short but obnoxiously loud mufflers don't pass, which is as it should be. And still, they've had problems enforcing it. Charges don't stand up in court.
If they were serious about this (and the related emission-control matters) ... the Ontario government would have kept Drive Clean, included a proper sound level measurement as part of Drive Clean (easier to do the testing in controlled circumstances as opposed to outdoors), and included motorcycles in Drive Clean. But instead, they scrapped the whole program.
YES, with that approach, some people could install their "compliance" set-up, do the Drive Clean test, then switch back to their noisy/higher-emissions set-up. But most people wouldn't bother, it's too expensive and too much aggravation ... and police officers have the option of ordering a Drive Clean inspection at any time if they suspect that something is amiss at a roadside stop.
Since that is obviously not happening, with the program scrapped entirely ... my conclusion is that the government isn't serious about this.
And at least in this area, the obnoxious riders have been substituting obnoxiously loud stereo systems in place of obnoxiously loud exhaust systems.