However, I'm not sure it is the way to go for employment contracts where you have an ongoing relationship with the other party.
If you your image is already of a bright immature developer (basically a prodigy grownup child) and you hold a lot of value for the company, then it might be useful to do something like that just to make the point that you really mean it, if they did not feel you are going to go through with your threat.
On the other hand if the image of myself that I try to create is that of a rational person that aims at finding solutions to problems, that wants to take more responsibility for bigger problems for the company, doing something like that could potentially be very damaging.
There is many ways to make the threat believable. First is not making threats that you are not willing and prepared to go through. If you have a history of mentioning on multiple occasion that you are going to leave the company then your next threat is not really believable because the only difference between it and previous attempts is in your mind.
Second, I am prepared. Having facts and being prepared for the discussion is immediate indication to the other person that you are serious enough to put some effort. Never go to a discussion like that on a whim, just after a stimulus that triggered you.
Third, I reduce this to just business. Business is language your managers talk and understand on daily basis. I explain that I have obligation to the family and there is only so much I can do to stay at the company if I have other, better paid options. I don't complain at the company, I don't try to create false image of accomplishment that somebody can see through. Instead I put it logically so they understand I have logically arrived at conclusion they also agree with that there is absolutely no way for me to stay unless they concede at least something. That this is just business and I have no ill thoughts or intentions, that as much as possible I would like to remain at the company but it is the logic that compels me to change job.
If I wanted to stay working remotely but my company did not I would try to do following:
1. Set up the meeting in advance and give advance of the topic that I want to broach. This gives them time to prepare but also makes it less useful for them to say they need to think about it after we have finished the meeting.
2. I would come prepared with arguments to show that working remotely was not detrimental to my productivity and in fact I was more productive because I was able to manage my time better.
3. I would empathize with why they would want to bring people back to the office, but then point out that even though not every person is, I am grown up, reasonable person and I don't need handholding to manage my time and keep pulse on my productivity.
4. I would say that my family is so happy with me working remotely that now this becomes a requirement so much, that if I can't meet that requirement with my current company I will have to start looking around for a job that will suit me. No hard feelings, but I am pressed by outside factors.
5. I would point out there is a new market for remote work and I am more than capable of finding a new job that will be paying reasonably for remote position.
6. I would ask that if they have some specific concerns about me doing my work remotely when the rest of the team does not, they bring it up to me and I trust we can reasonably discuss and find some solutions and we can delay my decision to leave the company until such time they decide that it is not working for them.
The outcome is still the same (they agree or not) but now they know they are talking to a reasonable person they can solve future problems with. Because I am not unpredictable and unreasonable it pays more to invest a little bit in the relationship.