Actually, I rather like your proposed objective. Except I'm not sure what you mean by "weighted average": what would be the weighting factor? I realize you said that you didn't want to get bogged down in the function itself, but I think it may be important.
If we can agree that capital is the means by which a person can achieve fulfillment (I don't just mean by "being rich", obviously. It may enable the person to donate to charity; or that person's labor, which which has a monetary value, may achieve some end; or to obtain medical care to cure an ailment; etc.), then I can see an answer.
In the free trade example, opening borders to trade expands the economies of both nations. That's pretty much the same as saying that more capital is available within both nations, which means that -- across the whole population -- people are better able to move up their utility function (i.e., achieve self-actualization). In other words, because money -- capital -- has the power to buy or enable other things, then our positions may be compatible.
Of course, some individuals may benefit more than others, and indeed, some may find themselves worse off. That's where some would claim that we as a society owe compensation to some, to pay for our own gains.
Looking back at what I just wrote, it seems the crux of the argument, then, is the degree to which you can believe that capital can provide the answer to whatever your objective function is.
I'm going to reject the example of a market in slavery. This is the very epitome of a non free market. The slaves themselves are being forced into the transaction, and since a free market, by definition, requires rational actors entering the transaction of their own free will (because they all expect to be better off in the end), it cannot be considered free.
The classic examples of market failure are "tragedy of the commons" problems due to externalized costs, and public goods that would suffer "free rider" problems, like national defense. The externalization problems are due to our legal framework for property rights; a system that fully allocates property rights (e.g., some person owns this river; some person owns the air) would fix this, as demonstrated by the Coase Theorem. The free rider problem is stickier. They do turn out to be much rarer than people believe (e.g., the classic example is the lighthouse, but historical research shows that in the past, these have been provided by markets), but they're not entirely fictional, and I don't have a good answer to the overall question at the moment.