If your staff are only learning skills they can't apply elsewhere, they're going to feel trapped. I left my last position as a systems integrator because I wasn't learning anything other than how to slap together off-the-shelf solutions and bullshit clients.
If you want new people to stay and you can't teach them skills that are valuable elsewhere, then you need to pay exceptionally well and reassure your staff that their jobs are stable. Ideally including contractually obligated recurring pay increases.
For someone with a 40 year career ahead of them, anything less will always feel like a risky dead-end.
Such that, I'm not sure how this works. They should count their luck that they have you happy to be there. But luck only goes so far. Or are my above assertions wrong and you think the people that left made a wrong choice for them?
And my assertion on the cost of education is a bit more nuanced. Specifically, I posit that if you transplanted the teachers from the good schools straight into your school, grades probably would not change. It takes more than just the teachers. Even transplanting the administration would likely not do much. The low performing school doesn't need the same level of skill as the well performing one. It needs better. And more.
I am the last person, hired in 2000, that has stayed with our division/site within our company, who enjoys what they do (Oracle DBA).
Everyone hired since has been gone within 3 years.
We are hiring the wrong people, and I'm starting to quietly state that fact. We need to hire people with an appreciation of computing history, specifically with a desire to learn VMS and OS2200.
In the same way, education needs to hire the "dedicated long-haulers."
These people are probably not in their 20s. Maybe, but likely not.
They need to proselytize, and they need to be efficient.
I acknowledge that such people do not come cheap, but they are the point of the infrastructure.