This is old age we're talking about. All of those three hundred million people are going to die anyway over that time period.
> much worse than any wars I can think of
The Taiping rebellion killed somewhere between 20 and 30 million people, approximately 5-10% of the population of China at the time. See if you can spot it on this graph: https://en.wikipedia.org/wiki/Population_history_of_China - it's lost somewhere in the steep vertical climb on the right.
For a part of that period of dramatic population growth, China famously had a (badly enforced) one child policy.
(also, I guarantee you that there's some maniac in the Chinese ministry of defence looking at a prediction of deaths in a nuclear exchange with the United States that runs into the hundreds of millions, and declaring it winnable. There certainly were on both sides of the US-Russia Cold War, fortunately ignored all the time)
Productivity of 10s of new STEM every few years > productivity of 300m of subsistence farmers / low skill workers in informal economy. Having a lot of surplus people helps in some domains of development / consumption, it's a drag in others, i.e. per capita food/energy security. Thinking about PRC being just 20% less crowded during holidays/events is still pretty stressful.