No that is NOT my opinion, I just want to highlight the logic flaw I see here. You cannot say that the same thing (underrepresentation) is a problem in one case and not in the other, that's just .. weird.
There's no path for promotion beyond "developer" without becoming a manager, but then you're not doing the work you're great at, so there's a disincentive to promote you, but the developers want to have career growth, so they get restless and eventually leave the company for a different one, usually getting a salary boost but possibly still being stuck as a 'developer' because they saw no advancement at their previous company.
I'm struggling through a similar situation now, although I have project management and team lead experience, I was never officially promoted because they were small companies and didn't want to bump my salary (or believed they had a flat heirarchy and "titles were meaningless").
There's really a gap between "scientific surveys" and the terrain I've seen. In my last project as contractor there were 9 male/developers and 4 females with a management title. The meantime-to-management I've seen is 2 years after graduation for women, 7 years for males. All 15% females of my 150-student class are now in management positions, 10 years after IT master's degree, and only 50% of the male students. If a women really wants to know what discrimination is, just step in as a male.
I've left companies where I wasn't promoted and created my startup 3 years ago. Sounds like my skills weren't the problem: I'm doing better than seasoned product managers who left the same company and created startups in my field, so as a developer I'm better at product management than my previous employer foresaw. But it sure seemed very important to my previous employer to promote a female team lead.