Oh yeah, sorry, I meant to post the drill!
So, the drill that worked for me this weekend starts out as a dry fire practice. You basically squeeze the trigger and count down from 5 to 1 as you squeeze. When the pistol discharges, you can check where the barrel is facing and correct your position ... *and* you can really catch your flinch. After you do this a few times, you can proceed do the same thing with a loaded firearm.
It's kinda the same concept as the drill when you fill your mags with a mix of ammo and snap caps... but the 5-to-1 drill allows for more practice when you're not at the range and gets in more repetition for muscle memory.
Also, the other thing that helped me (taught by another instructor) was hand/finger positions ... where you get your thumbs in the right place that supports the pistol. So, for example, when I shoot right handed, my left thumb presses against the pistol to make sure it's pointed straight, and I have the pistol seated securely between my thumb and forefinger. The position helped a lot with tightening my groupings.
On a moto related note, the 5-to-1 drill came at a good time, because this weekend, we were also practicing trail braking in a track training course where you're applying 10-20-40-60-80-100% pressure on the brake lever... same concept.
Hope it helps though - I've yet to take a full on pistol course (it's on the books for next year), so these are various drills I've picked up from shooting events and random conversations with other shooters and helpful RSOs etc.