Idiom for making fun of something people are ashamed of?
Solution 1:
If you mock someone’s misery, you rub salt into their wounds, described in the Oxford Learner's Dicionary as:
to make a difficult experience even more difficult for somebody
This Dictionary of Idioms gives a fuller definition and example:
Rub salt into the wound/(someone’s) wounds to make (someone’s) sorrow, shame, regret etc worse, often deliberately: I was very disappointed at having to miss the concert, and my friends kept rubbing salt into the wound by telling me how good it was.
And two examples from the media, where rubbing salt into the wound specifically means mocking someone’s misfortune:
City fans mock Manchester rivals: [Manchester] United let a 3-1 lead slip to lose 5-3 at Leicester yesterday, before City took on Chelsea at the Etihad [stadium]. And cheeky Citizens fans took the opportunity to rub salt into their rivals' wounds with an aerial banner. “United we fall ― in cinemas soon," read the message flown over the Eithad.
Hilarious Comeback Joke Takes Off On Reddit After English Mockery: Last week, rugby fans around the world cruelly wallowed in England’s early World Cup exit. Several jokes were posted online and it seemed as if England’s closest neighbours were most keen to rub salt in English wounds.
Solution 2:
The idiom add insult to injury is broadly used for the context:
Fig. Cliché, to make a bad situation worse; to hurt the feelings of a person who has already been hurt.
Or add fuel to the fire could be a good candidate:
Fig. to make a problem worse; to say or do something that makes a bad situation worse; to make an angry person get even angrier.
[McGraw-Hill Dictionary of American Idioms and Phrasal Verbs]
Solution 3:
The phrase "kicking a man when he's down" comes to mind.
This specifically touches on doing something to exacerbate suffering which should be sufficient on its own.
to do something bad to someone when you know they already have a lot of problems
His wife left him last month and I don't want to kick a man when he's down, but we simply don't have any more work for him.
Cambridge Idioms Dictionary via TFD
Solution 4:
If you want to refer to deliberately attacking something that someone is sensitive about, you could say they deliberately touched a nerve
Provoke a reaction by referring to a sensitive topic
Alternatively, you could say they attacked his achilles heel
A weakness or vulnerable point
Both definitions from the OED
Solution 5:
To push someone's buttons
Draw a strong emotional reaction from someone
The response tends to be an angry one.