> If you're a good employee then employers won't want to lose you.
That's very generously assuming somebody above you actually has a clue who's valuable and who is not, which I have to tell you that I have witnessed, yes, but rarely.
I would say then you have chosen the wrong employers. If you're working for someone who doesn't see your value then you're unlikely to be properly recompensed for it. Choosing a company with less hierarchy and more of a meritocracy would help.