Suppose that a team of people is laid off but is asked to temporarily stay to train their replacements. Is there any idiom that would describe people in such a conflicting situation? "Digging their own grave" comes to mind, but I typically associate that with cases where people work against their own interests by their own accord, not because they're forced to. "Faustian bargain" also isn't quite right but feels like the type of phrase I'm looking for.
rub salt in the wound to make a difficult situation even worse for someone
In speech I have often heard/used the shortened form 'rub(s) it in'.
As if being laid off wasn't bad enough, to rub it in [rub salt into the wound] management required us to train our replacements.
It's a dilemma, which in general means a choice between two unpleasant alternatives. In this case, you gain money but lose your pride, or keep your pride but lose money. It could be seen as a Hobson's choice: take the deal or get nothing. Idioms include between a rock and a hard place, damned if you do and damned if you don't.
I think it doesn't matter if they're "forced" ie at gunpoint to do something, or "coerced" as in giving a lot of incentive to do what will end their success/career/life. Then there's literally digging your own grave, ie at literal gun point, for a more "dramatic" scenario (I imagine Westerns would have been FILLED with these scenarios as the bandits or the like did their business).
Fallout New Vegas starts, I believe, with the main character literally doing this and then being shot in the head. But then Fallout doesn't even TRY to take itself seriously like Skyrim does... (or at least pretends to). (Fallout is full of stuff like robots sitting on toilets, teddy bears sitting on toilets reading the newspaper, etc. It's a ridiculous game, is what I'm saying.)