It's totally possible to get that, within a company. I worked for a Japanese company for 27 years, where they rotated assignments as a matter of HR policy. They also enforced things like code Quality, formatting, process, etc., to allow easy changes of personnel. Heavy-duty mentoring (by some of the top people in the entire world) and training. There was a direct career matrix, and the corporation took
very good care of its employees.
This did not come without cost. The overhead was staggering. Lots of what I call "concrete galoshes"[0].
Retaining talent is not easy. It takes a great deal more than just bucks. It requires a loyalty (true loyalty, not the "weasel" loyalty that corporations like to put into glossies), from the corporation, to its employees, and this needs to be inculcated into the DNA of the entire management chain; from the CEO, to the first-line managers. Like I said, it needs to start at the top. I seriously doubt there's many top-level folks that have the stomach for it.
I did it, under very challenging conditions, for over 25 years. When they finally rolled up our department, after nearly 27 years, the engineer with the least tenure had a decade. These were top-shelf, highly-experienced C++ image processing/algorithm engineers; not tired, sub-par, oldsters.
[0] https://littlegreenviper.com/miscellany/concrete-galoshes/