Personally, I'd go one step further. It's small teams that were together from the start. Going through the initial setup of a project makes all the difference. When people come later, they lack the intuition that comes with being around when all the structural decisions were made. Early people make tradeoffs and bake good and bad practices into the pipeline, later people are told not to touch certain things because it's more complicated than it looks or will break something else that doesn't seem explicitly connected.
I've been on both sides of this fence. Having started a company and sold it - my partner and I were hyper productive, but while the small team that inherited the code is extremely capable, it took years longer to feel comfortable making big changes than it took to write.
Joining other people's projects and large codebases, on the other hand, has always taken a long time for me to be productive in. Typically it takes a year at a new company before I'm moderately useful.
Personally I don't think this has a ton to do with programming languages, even though I feel much more productive in python and javascript than C++ myself, even though I've been using C++ longer. I still suspect familiarity with the early decisions is a greater factor in productivity than language.