Yeah, except most of the time, in my experience, employees rarely try to solve problem A. They may say something or be passive aggressive, but quickly give up and become disgruntled.
As someone who has been an engineer at all levels and now an exec at a public company, I rarely give counter offers in this situation. I think there are some cases where it can work, but in most cases; if someone wants to leave, you wish them the best and move on.