Possibly true, though for the same position it will be the same pay. Having managed H1B employees, every year I was required to fill out a bunch of paperwork confirming that I was not underpaying them for their work relative to their peers. We were fairly rigorous about this.
That said, you're only on an H1B visa until you get your green card. By which point, you've gone through several promotions and are finally leaving the junior engineer position. I would also expect H1B numbers to be skewed lower for this reason.
If people really want to know what the salaries are at other companies, they should just make friends with their generalist. Big company HR orgs pay third parties to do more stastically rigorous surveys of salaries by position and use that to determine how "not to overpay."
My relatives went through the H1B process. I know exactly how employers treat them. They understand that you're tied to them, and even though you could transfer, it resets your greencard process.
My father was making less money than the people under him, even though he was the chief engineer (vs regular engineers).