Yes, there was investment, but investment without free markets and capitalism doesn't work usually for end products like cars. It's not a linear function of the capital invested, it's not possible to spend your way into good consumer products. That's not infrastructure. That's why I was mentioning that before Tesla came that investment didn't lead to any strong EV automotive players. In 2016 there was a big scandal on widespread EV fraud, where manufacturers just built to get the subsidy(骗补).
The policy shift came around 2017 when the government understood that subsidies and closed market created lazy automakers (e.g. check the US market for the same dynamic in trucks). In 2018 they removed subsidies for cars less than 150km of range and changed the requirements to receive them tying them to battery density.
After Tesla came and subsidies were reduced, most of the inefficient companies went bankrupt. It was the free-market competition that killed them. The reason why it changes was the competition not the subsidy. The subsidy was somewhat important, but as many of us knows, nothing government run produces good consumer products, you need market and free choice to get productivity. So it was the free-market and subsidy cutting that created the BYD, Li Auto, Xpeng and Nio. That's the proof that without free market it's impossible to have strong companies. And without subsidies you can have strong companies, even if it takes more time.
In EU and USA subsidies didn't create a lot (Northvolt?), because there were not enough free-market driven demand and too much regulation to jumpstart the free-market forces that will start the engine of innovation.
So the answer is not "capitalism and free-market doesn't work and governmental industrial policy is the answer", but it's the market that creates the strong companies. You can speed it up with venture/government capital, but without the brutal competition in the marketplace where people vote with their wallets you won't make it work.