I agree that choice of project has a large effect. Projects that involve collaboration with a lot of partner teams increase your chance of promotion because the more people your work impacts positively, the better your set of peer recommendations when it comes time for promotion.
It's much harder to "sell" a project whose effects are only directly visible a few people, even if it's valuable work.
Priorities shifted. Management traded my project away to our sister team in India. In exchange, that team gave us one of their projects. It was an undocumented system, built on deprecated infrastructure, but it was nevertheless a critical component in production. I was assigned to untangle it from our sister team’s code and migrate it to a new framework, all while keeping it running in production and hitting its performance metrics.
I am not good at wording things, but here goes: I didn't see you call it out directly, but I also find employees are discriminated by project. if you are not working on a valued project, any value you provide to the company will be shrank by how unimportant they feel the project is.