I haven't found this to be the case at all. I know many people who jump companies every 3 years or so, make more money each time they change, get to work on a variety of projects that interest them, and are well respected by their peers regardless of what company they are with due to the work they have done and continue to do. It is relatively common advice that you are generally able to advance faster by moving between companies and negotiating for better pay and titles rather than trying to get promoted frequently while staying with the same company. If you decide to take a position where you will be doing dull, dead end work with "dumb" people that is your own fault.
Just as a counterexample, my job changes early in my career netted me raises of sometimes 50% but each subsequent one increased less on a percentage basis. My last job change (now have 20 years experience) was +0%, and I give even odds that it will turn negative soon as I get older.