I'm curious, how much more do you think you could get by leaving, or if you had been job hopping? Companies say they value loyalty, but that can seem fake if loyalty ends up costing the employee money.
tbh, I haven't had the will to job hunt, so I can't say for certain; I can only speculate based on data for my area. There are other positive factors that keep me at my job.
What I maybe _should_ have said is that I may have been able to make more money more quickly if I job hopped. There's an unfortunate disconnect between a development team that understands value (and is responsible for all hiring decisions) and a non-technical upper management. I'm fortunate to have a supervisor that fights on my behalf, and I'm pretty aggressive in pushing it myself.