Technically true, but that does not in any way imply that the reduction of infant mortality was due to capitalism itself.
If one uses a regression analysis, the greatest reduction of infant mortality came from governmental and social battles against the industries that profited from capitalism.
When cities grew too urbanized to allow farms inside their borders, milk needed to be brought in from farther and farther away. Two trends followed. Long term was the development of chilled train cars; short term the adulteration of milk to make it cheaper. Look up swill milk, but not on a full stomach. Milk was the first but chilled meat soon followed and then laws like the Pure Food Act in the U.S., a direct blow against capitalist overreach.
The improvement of infrastructure for sanitation was also crucial. Water systems created pipelines, aqueducts, and treatment plants to deliver pure water. Sewer pipelines and treatment plants kept sewage out of rivers, especially after the Great Stink. These were all governmental efforts, since they benefitted everyone.
Medicine was primitive by today’s understanding and so was hygiene and nutrition, but the 19th century still saw efforts to improve standards in all those areas, none of them capitalist for-profit organizations. On the contrary, the capitalists tried their very best to peddle poisons that could have killed off everybody, not just infants.
Infant mortality is hard to pin down, and subject to great variations, but a reduction of the rate of death for those under five of 50-75% from 1800 to 1900 is probably in the ballpark.
What can be pinned onto capitalism is shortening adult lifespans with their pollution and disregard of workers. That’s why capitalists were so hysterically fearful of communists and kept denouncing, persecuting, and jailing anyone tagged with a Marxist label.
We’ve survived capitalism solely because of governments using “leftist” notions to place regulations on its “do literally anything to make a profit” underpinnings. An unregulated capitalist society would be as totalitarian in its way as any dictatorship. Neither extreme would be livable under. I firmly reject both.