ശവത്തിൽ കുത്തരുത് (śavattil kuttarut)
is a Malayalam saying that in literal translation means "Don't stab/poke the dead body". The meaning would be something like: don't humiliate a person when he is at the bottom end.
How about -
To make something that is already difficult, unpleasant, or painful even worse; to accentuate, aggravate, or intensify a negative situation, emotion, or experience (for someone).
(From The Free Dictionary)
If someone or something rubs salt into the wound, they make the unpleasant situation that you are in even worse, often by reminding you of your failures or faults.
(From the Collins Dictionary)
OR (a simpler meaning)
To make a difficult situation even worse for someone
(From the Cambridge Dictionary)
"My pride was already hurting when I didn't get the job, but hearing that they gave it to Dave really rubbed salt into the wound."
"To rub salt in the wounds, the bankers got big bonuses as the rest of us struggled to make ends meet."
Kick someone when they are down
Cause further misfortune to someone who is already in a difficult situation.
"Don't kick a man when he's down."
Do not add insult to injury carries the connotation of humiliation on top of damage.
See for example https://idioms.thefreedictionary.com/add+insult+to+injury and the richer explanation in https://www.idioms.online/add-insult-to-injury
Bring something, especially an error or fault, repeatedly and forcefully to someone's attention.
Both it and dirt are such long-standing euphemisms for training dogs not to defecate indoors by rubbing their noses in their own shit that most native speakers would probably not think of the original metaphor. Nor is that still the accepted way to housebreak dogs.
If the bad situation was caused by the same person who is now humiliating the victim, you might say they are "twisting the knife" (or equivalently, you might tell them "don't twist the knife"). The analogy is that they stabbed the person and are now twisting the knife to make the wound worse.
twist/turn the knife (in the wound)
to make someone who is annoyed, worried, or upset feel even worse
If the bad situation was self-inflicted or caused by a different person, the already mentioned "don't rub salt into the wound", or "don't kick a man when he's down" (with appropriate gender) are better. "Don't add insult to injury" is more literal phrasing with the same meaning.
And if it was self-inflicted you might also say "don't rub his nose in it", which has shaming-related connotations. You would typically only use this phrase for self-inflicted situations because it makes no sense to shame somebody for something which was inflicted upon them.
If you just want to call attention to the fact that the person is delighting in somebody else's misery (akin perhaps to saying "You are poking the dead body" in Malayalam), the term used is the German schadenfreude (but you'd never say anything along the lines of "
don't schadenfreude". Very informally you might say something like "wow, schadenfreude much?" to show mild disapproval).
There's also "beating a dead horse", which is similar /close to what you've requested -
To continue to focus on something—especially an issue or topic—that is no longer of any use or relevance.
(Also, flog a dead horse.) Try to revive interest in a hopeless issue.
(From the Free Dictionary)
This could be restructured to mean someone who is humiliated or insulted even though he is already in a difficult situation. This could be linked to the literal meaning of "flogging a dead horse" - beating a horse even though it is already dead.
Suggested by Sven Yargs -
"You're beating a dead horse," meaning (literally) that the thing you are taking out your anger or frustration on can no longer feel it or learn from it or suffer any longer as a result of it. It also has the figurative meaning "you have already made your point about this subject, and at this point you are just wasting everyone's time and annoying them with the repetition.
The first thing that comes to my mind, and pretty similar to the expression as you say it, is "No point in beating a dead horse".
However, if it's more about making things worse/humiliating someone, I'd say '... kicking a man when he's down' as rajah9 says, is the most appropriate one.