If you give a pile of cash to someone who is an outcast from society, and won't be accepted by society, and who has little or no ability to utilize that money effectively, that person doesn't become a "contributor." They become a mark. They are soon separated from that cash and no better off than they were before.
Money alone doesn't lift people up. Until you fix the inequities in society and get to a point where the poor are capable of moving up, it won't happen. That takes generational effort, often many generations of effort.
China is doing stupid stuff. They have massive corruption--expected with a massive government--and what they build has more to do with politics and propaganda than sound economic reasoning. It's like California building their high speed rail line. If few use it once complete--assuming that ever even happens--and it hemorrhages money, at some point it will simply disappear from use.
Look at the BART system. Ridership is falling fast on that as remote work and cost of fares rise. It's at a point where the system is going bankrupt. Politician's solution is to raise taxes and fares more.
BART faces annual deficits approaching $400 million, after ridership plunged during the COVID-19 pandemic.
nypost.com
It hasn't created a middle class so much as a YUPPIE and oligarch class. The same thing occurs in most dictatorships.
The US built out after the civil war on personal wealth and by work and individual investment. US military spending could certainly take a reduction, but that's unlikely. The rail system in the US from 1870 to 1900 (roughly) was primarily built out using private investment, not government funding.