Unless they need you more than you need them, announcing your intent to leave "unless..." puts you in a more difficult negotiating position because you have signaled you have other options that, perhaps more challenging for you, are an easier solution than them having to fix it for you. HR isn't your friend.
Practically and more directly, if you can be easily replaced then your workplace issues are yours. If you are difficult or expensive to replace, your workplace issues are theirs.