The question wasn't about how "optimality" there would have been defined, but what philosophical assumptions might have been used in defining it that way. And would those assumptions have been part of a pro- or anti-capitalist evaluation? But it was only an example.
Again, you're assuming that economists base their economic beliefs solely on their explicit work with models, as though they were machines rather than people with philosophies and dispositions. What would stop an economist from valuing a political system by going outside the bounds of pareto optimality, and then disguising that judgment with a tweak of some model? Nothing at all because economic experiments are hardly as decisive as those in the natural sciences (because society doesn't work like nature). Your idealistic view of economics reminds me of all those movies in which the young lawyer confronts reality, loses his naïve, academic view of the law, and becomes a grizzled veteran.
By the way, before pareto optimality there was utilitarianism. And as the video below shows, the choice between those approaches is philosophical. (See the section on value judgments, at the 7:37 minute mark.)
If only economics progressed like physics, we could tell the difference between archaic and modern economic theories. The method economists use has certainly changed, as have plenty of details in the models. But I can supply you with numerous sources that say the neoclassical tradition is still the dominant, mainstream approach to economics. This means most economists are individualists, and they use mathematical abstractions to show how an idealized form of capitalism would work, insinuating that that model is somehow relevant to actual capitalism, and that pure capitalism would be self-regulating.
If you know of an official record of economists' consensus on the merits of capitalism, I'd like to know of it. I've seen polls and anecdotes, but no representative statement apart from the textbooks' distinction between neoclassicals, Keynesians, and the heterodox. There seems to be much confusion on the nature of mainstream economics, probably because there's no great consensus, because the discipline isn't as scientific as it pretends and as you're implying.
https://www.youtube.com/watch?v=jXfMzjh_SMA&ab_channel=NewEconomicThinking