I think it's a mindset that people "get" trapped. I know many engineers who are trapped, but it was their own doing, they never tried to avoid the trap and have never worked hard to get out from it. It's a mindset, it's easy to fall into. You get paid well enough, things are stable, you become an expert within a company or industry, and you feel valued when your expertise is found to be important. If you don't work to get yourself out of that trap, to expand your own value and knowledge, then you get stuck both in a job and in a salary range. Sometimes this is fine, sometimes it's a horrible experience, it all depends on what the person is striving for.
I've worked with many people who were realistically less than 5 years from retirement, most of them were "trapped" but this was often by design. They knew they could ride out the next 5 years getting paid pretty well, having low stress, and the stability of this ensured that they'd hit their retirement financial numbers. Sometimes younger engineers fall into this trap, and that's when it's sad, often they don't even realize it and no one tells them.