The USA is just as bad, if not worse. The mechanisms are different but the effect is the same.
If you don't take honors/AP courses throughout high school, then you're cut off from an entire world of possibilities. And if you are in the wrong ZIP code, you might not have access to those courses at all. Do you know what percentage of US high schools offer AP CS?
The US segregates pretty heavily starting the last year of middle school / first year of high school. You can jump tracks, but it's hard (and the same is true in Germany btw). Some tracks aren't even available to poor (esp rural) folks. Wealth determines which tracks are available. Within the set of available tracks, teacher recommendations play a big role in which path a student is suggested to pursue. Biases exist, and people will often follow whatever path their parents followed.
Although you can get into some college without honors/AP courses, those lower-tier colleges are typically closer to something like an applied university. With correspondingly similar differences in outcomes. So, in the USA, your ZIP code and teachers' decisions from freshman year of high school do have a large effect on your life path.
Germany's system isn't perfect, but "egalitarianism" isn't a strong defense of the US system relative to Germany. If anything, the US system is worse.
The idea that living in some particular part of the city might mean you actually can't get a gymnasium-level education is insane in Germany, but AP deserts are a de facto reality in large swaths of the US.
At least in Germany it's explicit, people realize what's happening, it's at least somewhat merit-based, and your parent's ability to purchase expensive real estate doesn't play such a huge role.