In practice, free market folks often accuse those to their left of falling into the fallacy of thinking the economy is zero-sum, and this is embodied by the 99% movement and calls for wealth taxes, but I think both sides are guilty of fallacies. Certainly, if we take a long enough view, then it's abundantly clear that net global wealth does increase: the world is far wealthier today than it was a hundred or a thousand years ago, without question. But these are long timescales. How can we reason about shorter timescales?
Thermodynamics is primarily about the idea of heat, and how it flows from one system to another. It provides for different ensembles, each with their own rules of whether heat is invariant or not. If we equate heat with wealth, I believe we can find some interesting parallels. Typically one starts with the idea of total heat being invariant, and then define one of the systems to be very big and call it the "surroundings", and this leads to the "canonical ensemble" in which heat can actually enter and leave. One could take it further and compare particles to people in a "grand canonical ensemble" but I'm not quite ready to go that far. So let's say the economy is a canonical ensemble, where the total heat/wealth is free to increase or decrease over time. So what does a partition function map to? I have no idea, and will have to think more about it.
There are many types of reactions in which heat, particles, temperatures, volumes, etc, may change. One type of reaction we all learn about in introductory thermo classes is known as adiabatic. An adiabatic reaction is one in which no heat is transferred, such as expanding/compressing a perfectly-insulated (so no heat can escape) piston. A more practical, though slightly more confusing, example is a very fast reaction, such as gas rushing out of a punctured high-pressure container, which cools down because adiabatic expansion decreases temperature. This reaction is adiabatic because it takes place more quickly than the heat can transfer. Interestingly, you can also achieve adiabaticity with a very slow reaction, but that's something else entirely.
So we've seen that on very short timescales, systems are effectively adiabatic. In the same way, on very short timescales, the economy really is zero-sum. When we hear news stories that "XX trillion dollars of wealth were wiped away today", that's nonsense, because in a 24-hour timeframe, the economy is zero-sum. In this case, it wasn't even a transfer of wealth from one person to another, but a realization that the wealth never actually existed in the first place (there's likely an analogue to virtual particles here). However, when one person suddenly (i.e. adiabatically) becomes very rich in actually realized gains, it generally does mean that somebody else lost. Winning and losing is certainly an important part of capitalism, which isn't inherently problematic, but it does mean that some care should be paid to the systems that are in place, and we should try to understand exactly how the wealth is moving.
Where does wealth come from? Technological advancement is certainly important here, from the innovators who come up with the ideas, to the entrepreneurs who fund them, to the workers who make them happen. When an entrepreneur becomes wealthy, there may be some "zero-sum" component to it, but generally most of the short-term gains are unrealized, and it takes much longer for the real wealth to show up. So outrage against this wealth seems counterproductive. Given these analogues, it seems to me that the issue is with the bankers and speculators, whose wealth is presumably coming from ordinary people. So the challenge is this: how do we realign incentives to arrest this flow without negatively impacting legitimate investment in innovation?