“eventually finds their way into a role where they are paid proportionally to their productivity”
I don’t think that’s true. There are plenty of people who do great work but aren’t good at necessary self promotion. Or they just want to stay where they are. So they are very productive but are paid pretty much like everybody else.
I have had the pleasure of working with several truly outstanding engineers over the last few decades. My experience is that they're generally happy if they get to keep doing what they love and excel at (coding) and don't mind that they're "only" paid 1.5-2x the industry norm for Joe/Jane Average programmer. Joe/Jane are getting paid enough to be very comfortable and 1.5-2x that is extremely comfortable.
In the meantime, of course, it's as you say - and in fact they may be paid less, because they're spending their energy on engineering instead of political maneouvering.