Without loyalty, or at the very least aligned incentives, you will never get the most business value out of developers.
Early on in my career I was the sole dev looking after a large legacy system. For 4 years I worked really hard and added a lot of business value. I was not rewarded at all; No promotions, minimal pay increases, no respect etc. All the while my tech skills were getting out of alignment with what the industry was paying well for.