I sincerely disagree. Taking the extreme case you described as either do it or be fired, the other party wants a result, a task done or something similar, which still won't be done if they would fire you on the spot. It seems you misread my reasoning as blindly standing your ground which is not the case I was making. If there is a good reason to switch what you're working on, you should, as I also said above. But if there isn't one, you should either ask until you get a good reason or stand your ground.
The argument from privilege frankly confuses me. I've applied the same principles both when I've been the underdog and the one asking others and it's good guidance since it also gives you input whether you want to work where you currently are. Sometimes I've had harder times because of it, but I've never stayed in an abusive work relationship.
I remember when I had ~3 years of working experience. We were on the tail end of a fixed price/fixed date contract. There was a bug that needed to be fixed, and it was in a module that everybody had worked on, and the code was pretty bad.
So during the meeting, I said: that bug is just a sympthom, the module needs to be rewritten. And I knew what I was talking about.
No, said a senior, we're just going to fix the bug, no rewriting. I said that's your call, but I sure am not going to fix that bug. I can tell you: nobody listened to me.
So he more or less finished the discussion and said: I'm going to sit down with you, and we're going to fix that bug. And we did.
In that case there clearly is a good reason though? In the scenario described, you have one known bug, in the case of a rewrite you have an unknown number of bugs. Surely, both approaches may have more unnoticed bugs in them but in the former case people have already tested the solution so that's less likely. When you rewrite, you enter new untested territory with more room for new bugs.
Every junior and intermediate dev would like a word with that concept, because it sounds magical. Once you have a few years at an org under your belt, you have the creds to pipe up, but until then, you either talk with the better devs in private and hopefully convince them, or you do what your boss told you to do.
The argument from privilege frankly confuses me. I've applied the same principles both when I've been the underdog and the one asking others and it's good guidance since it also gives you input whether you want to work where you currently are. Sometimes I've had harder times because of it, but I've never stayed in an abusive work relationship.