What's an idiom to express the idea "the correcter stands corrected"
If correcting everone's grammar could be considered an unpleasant act then "a dose of (one's) own medicine" might be appropriate. Especially since the "medicine" is "fixing" other people mistakes.
"a dose/taste of (one's) own medicine" An experience of the same harmful or unpleasant thing that one has inflicted on others or an attack in the same manner in which one attacks others. https://idioms.thefreedictionary.com/medicine
To be hoist with/by/on one’s own petard.
"A-ha! You who are a linguist and always correcting everyone's spoken and written language, you have been hoisted with your own petard".
OED to hoise: (obsolete – now “hoist/hoisted” – to lift/lifted up) 2b. hoist with his own petard (Shakespeare): Blown into the air by his own bomb; hence, injured or destroyed by his own device for the ruin of others.
OED Petard: A small bomb made of a metal or wooden box filled with powder, used to blow in a door, gate, etc., or to make a hole in a wall. Now historical.
1849 T. B. Macaulay Hist. Eng. I. iii. 322 A third had defended his old house till Fairfax had blown in the door with a petard.
Figuratively (as in your example):
1882 Nature 15 June 146/2 The criticism of practical men..was disarmed; these found themselves hoist with their own petard.
Try "the biter bit":
the biter bit
A person who has committed wrongs is now experiencing the same kind of torment, adversity, etc.
Looks like the biter bit. She's always bullied me, and now she's getting a taste of her own medicine.
Ah, the biter is bit! A prankster deserves to be the target of his own tricks once in a while.
TFD Online
In my view, this exactly corresponds to what you're looking for.
Physician, heal thyself
From dictionary.com:
A biblical proverb meaning that people should take care of their own defects and not just correct the faults of others. According to the Gospels of Luke and Matthew, Jesus said he expected to hear this proverb from the people of his hometown of Nazareth, because they would want him to work miracles there, as he had in other towns nearby. But he “did not do many mighty works there, because of their unbelief.”