Energy is lost as heat. Condesators heat up dramatically at high current. Look at induction heating - condesator in LC tank heats up dramaticaly. Polyester condesators with no electrolyte heats up! Currents in that very moment are enormous and so energy losses are. Your setup looks like Colpitt oscillator with very low inductance(and straight wire have inductance). Current jumps back and forth maybe and million times(some miliseconds) before come to stop.
If you read my previous post with the analogy of 2 air tanks, then consider this....
2 caps of the same size, 1000uf with 5v and another 1000uf cap with 0v. We connect them together till each has 2.5v, and we have lost half the energy, and of the loss, it is said to be lost in heat.
Now lets take the same 2 caps, one with 5v and one with 0v. Now we set it up with a very low ohm switch that is controlled by a circuit that opens the switch when a voltage gets to 2.5v or lower.
So between our 2 caps, we include our switch device and an inductor of say 10mh(which can be had with pretty low ohm resistance) in series with the switch.
The circuit that detects a voltage at or below 2.5v will monitor the source cap. We close the switch and when the circuit opens the switch, we will find that the 2 caps have very close to 2.5v each, with near 0v across the inductor just before the time of switch off. But the inductor has a stored amount of energy that is near equal to what looks like we have lost during the transfer from on cap to the next.
In the end, the 2 caps have the same voltage using the switch and inductor, as we did if we just connected the caps directly. Now, there is resistance in all things, the caps, the coil, the switch, the wires. Well where are our heat losses when using the inductor? Sure the inductor slows down the transfer, so less current, but over a longer period of time using the inductor. So there must be heat losses while using the inductor, right?
Well after all that, say the 2 caps have no resistance, and say no inductance, just to avoid ringing, what voltage would you say would be in each cap when we connect them together? More than 2.5v each?

No losses would mean what? 3.5v in each? I cannot agree. Lets say we consider electron charge. 2 empty caps, 0v each. The have say an equal amount of electrons on each plate. We take 1 cap and we pull electrons from one plate and push them onto the other plate. For simplified example we say 5v has pulled 5000 electrons from one side of the cap to the other. So now 1 plate is missing 5000 electrons and one plate is over loaded with 5000 electrons. When we connect the empty cap to the charges cap, how do you think that imbalance of electrons is going to be divided up between the 2 caps? Do we lose any electrons in the exchange?? Would we gain any electrons using an inductor?

??

Can we not see that in order for there to be a balance in the end, the empty cap, one plate will take on 2500 electrons from the overfilled plate of the source cap, and the other empty cap plate will give 2500 electrons to the source caps depleted plate. So now each cap has a plate with an over flow of 2500electrons and the other 2 plates have a depletion of 2500 electrons, giving each cap 2.5v. Why is that so hard to comprehend? Any other way would have to add or take way electrons from the caps from an outside source. But no, we end up with half the voltage in each once the imbalance, balances out.
And my contention is that we lose that energy between cap to cap by simply not putting it to work during the transfer. Heat, what ever. Lol, that heat is a spike, just like the spike that many claim is just about nothing when it comes to a field collapse of an inductor, when we consider the time period that it happens. So why is this spike such a great loss, when they consider the field collapse to be such a little thing.
And the reason why there is less loss with a direct transfer from a tiny cap to a large cap is the fact that once things balance out, the amount of energy in the tiny cap is mostly all in the large cap, and can be used, as such from the large cap, just a different voltage range. Less current, longer time.
Along with the large cap to the smaller cap, the large cap doesnt lose much because the tiny cap only took little. Same can be said with the air tanks.
The only heat that I would consider the loss would be the heat generated by charging that source cap to full, then wasting it by depressurizing into another container of equal size without taking advantage of the action of the transfer by using it to do something of value.

In the end, there is no more or less total air in the tanks(total), nor is there in the caps(total), at any given point.
Mags