Overall system work is zero. The center of mass has not changed. Work done on or by the gas is zero, zero delta Volume. Constant volume. It's similar to the two weights being connected by a rope, or rocking beam. The rope or beam does no work.
If you want the overall system can be broken down to the addition of two systems. One for each weight.
Thermodynamic energy transfer is called heat, not work. A cylinder and piston does work if it pushes with a force, for a distance. We call it pressure times volume change. Or P•∆V=W this is the same as F•d=W
I'm falling asleep. Am I making any sense? Do you want more?
Yea that makes sense.
The problem I see is that is discounting some things. One thing is that a mass has been set in motion, so some work must have been done.
The other is that if one were to need the mass elevated on only one end and only once, then work has also been done. You’ve simply traded the lower elevation of one mass for the raised elevation of another. If you had a surplus of rocks that needed to be buried, you could raise construction materials to build a building, for instance.
It is also more of an analogy to a system that has balanced forces and an abundance of energy. The hole that the rocks are buried in should not be considered like a “cold hole” but instead the path where the energy within the rocks can flow.
The energy in this case is moving through the gas, but there seems to be no thermodynamic path.