Happens in all seven Harry Potter books to all three main characters. Justified to an extent — their robes makes it rather easy to stomp someone's foot without it being noticed, so it's the main way they get each other to shut up.
In the sixth book, Harry (again) kicks a wall out of frustration and hops (this time trying to enter the Room of Requirement without success). Unsurprisingly, this elicits a yell of "OUCH!", and he thinks he might have broken his toe.
In book three, Ron steps on Hermione's foot (to be fair, their environment is dark, so Ron can't see well).
In book seven, Ron accidentally nudges a piece of white-hot cursed metal with his foot (long story).
In Harry Potter and the Deathly Hallows, Hermione tries to kick Ron under the table when he makes a tactless comment to Luna during Bill and Fleur's wedding but strikes Harry by accident.
In Order of the Phoenix, when Ron starts to make a blunder while they're out in public, Harry actually mentally laments that they're in Muggle clothes and thus it would be too noticeable to stomp on his foot.
In The Casual Vacancy, the book Rowling wrote following the Potter series, this happens deservedly to Simon Price after he aims a kick at his son and misses.
One of Adora Belle Dearheart's favorite tactics against people who makes sexist remarks, or try to stop her from smoking her ever-present cigarettes. It helps that she wears stiletto heels. Though she suffers the effects of this trope herself as well when she decides to spike the foot of a City Watch officer who's made of rock.
In Making Money, Cosmo Lavish, the novels antagonist whos obsessed with Vetinari, gets a pair of shoes stolen from the palace and suffers Agony of the Feet because theyre much too small as Cosmo is very large, while Vetinari and his clerk, who the shoes may have actually belonged to, are both thin.
Michael tries to break a thick wooden rod he's been chained to in the Knight and Rogue Series by kicking it over and over. While this works in the long run, during one particular moment of panic he slams his foot into it so hard that he thinks he's broken his own bones for a minute.
Mr. Men: In Mr. Grumpy, the eponymous character stamps on Mr Happy's foot after the latter tells him that he needs to change his ways.
In Prince Caspian, the Narnian mice weaponize this toward the Calormene soldiers. Justified because they cannot reach higher than the belt.
In the Transformers: Shattered Glass story "Blitzwing Bop", a shopkeeper gets annoyed at Soundwave for accidentally chasing off his star attraction, and kicks him in the ankle in anger. Seeing as how, well, Soundwave is a giant solid metal robot and all, it hurts the shopkeeper's foot a lot more than it hurts Soundwave. (Though Soundwave does consider it "Most bogus!")
Septimus Heap: It is mentioned that Spit Fyre likes to do that with people, so that Jenna cautions Wolf Boy against getting too near when they're fetching the dragon.
In the Junie B. Jones book Junie B., First Grader: One Man Band, Junie B. accidentally breaks her toe when she kicks her mother's watering can that has a picture of a cow. Her sore toe became important afterwards.
In one of his stories, humorist Patrick McManus discusses this trope, commenting on the somewhat magical propensity of already-injured toes to attract further damage.
In The Girl Who Kicked The Hornet's Nest, tiny-but-fierce protagonist Lisbeth finds herself fighting a giant with congenital analgesia. To even the odds, she hides under some furniture with a nail gun and literally nails the giant's feet to the floor. He can't feel the nails, but he can't move, either.
In Amber Brown Is Tickled Pink, Amber, her mother and her stepfather to be visit Camp Sukkatukket, a camp owned by the father of one of Amber's classmates, Fredrich Allen. When Fredrich spots them, he drops a hammer that he was using to repair the cabin porch out of shock and then starts hopping up and down. He dropped it because he wasn't expecting Amber and her family there and the two of them aren't even friends at the time. (Though they become friends during the visit.)
In Dragonsong, lead character Menolly runs for her life from an approaching wall of lethal Thread and ends up running the very skin off the soles of her feet. The nerve damage is so extensive that Menolly has pain in her feet not only for the remaining two books in her trilogy, but for the entire series.
Mercedes Lackey's Arrow's Fall: After being caught trying to escape Hardorn, Kris is killed and Talia is captured and tortured. Among the tortures is severe bone-crushing torture to her feet. Healing her broken feet after she is surprisingly rescued is also incredibly painful, because she has to help and can't use pain killers or anaesthesia.
Congo Mercenary by Mike Hoare. After a mercenary rapes and murders a woman, he's brought to Hoare for court-martial. There's an argument over sentencing — one officer wants him shot in the same manner as his victim, another wants him thrown out of the unit. Hoare decides to Take a Third Option as they're not a properly constituted court for inflicting the death penalty. He has the mercenary held down and shoots off the big toe on each foot with his .45 pistol.
River Of Stars: In the young noblewoman Lin Shan's first major Silk Hiding Steel moment, she subdues an assassin in her house, then asks the attending police officer if she could strike him once before he's taken away to his death. He allows it, so she shatters his feet with a heavy walking stick in retribution for the attack on her family.
Beloved: When heavily pregnant slave Sethe tries to run away, she's deadly tired and just lies by the river. Her feet are badly battered and swollen. A white girl called Amy Denver finds her and offers to help her. Amy begins to massage Sethe's feet but it hurts like all hell. Amy tells Sethe that it is a sign that she's alive and that she will heal.
The "deliberate mutilation" version happens in Son, where Trademaster chops off part of Einar's right foot for refusing to make a trade. Einar survives but has to walk with a cane for the rest of his life.