Even then, while this kind of individual calculus is at least tractable, there is also the concern of large-scale cultural drift, as in the net impact of the world's smartest people collectively working on things like ad targeting, engineering synthetic financial derivatives, and figuring out how to manufacture scarcity out of abundance so speculators can get rich off of modern tulip mania, compared to what good might have come from whatever else they could have collectively accomplished. It's entirely possible that if Google and Facebook are as good at identifying uniquely talented and intelligent people as they think they are, they could have figured out how to entirely eradicate malaria if that is where they chose to direct the effort rather than figuring out how to predict the spending habits of most people in the world and using some of the profit to buy nets.
I'm not saying this for sure comes out against working for personal profit, of course. Louis Pasteur effectively proved the germ theory of disease, enabling the population explosion of the post-industrial age and possibly the most good ever done, while trying to figure out how to make better wine so he could patent and sell the process. But scant historical knowledge though I have, I'm having trouble thinking of historical examples of great good done by people just being wealthy and giving money to others who then do good, as opposed to direct work on technological good multipliers even when doing good is not the intention. At first, I was thinking maybe Da Vinci, but he might even be a counterexample in that he had little to no direct impact on science and engineering in the centuries to come despite conceiving of quite a few novel devices that were eventually invented. Perhaps if the patrons of Renaissance era Europe had paid their greatest minds to work on engineering instead of art, we could have had the industrial age centuries earlier.