Not true at all. You just need to find a company that values you and your work.
Our company intentionally hires juniors so that we can groom them as they grow. I was one of those juniors < 5 years ago and I've increased my salary > 100%.
You can't just dismiss their experience based on your experience. I, for one, have also found it to be very true, and I think most people would agree (insofar as it seems to be a bit of a meme).