Why are you stuck with this world if there's a clear ceiling?
> at best I'm going to get a salary offer of maybe $180K
If you get a $20k increase every 2 years starting from $160k by hopping jobs, that's way more than your yearly 2%. If you're in the right location, the only risk is to quit a job 2 months in because it's actually not what you expected and come back to a company you initially rejected, or start applying again. If you're a dev in your 30s you should have enough money to stay afloat for at least a few months, in which case this is not that big of a risk.
There's also a risk staying in the same company for very long: if you keep doing the same, using the same tech, you can become complacent and your skills irrelevant. At which point staying at your company is not really a choice anymore.