This is leaving out that this only works with air (and many other gases) at room temperature, but neither all gases nor at every temperature. The Joule Thomson effect, or rather the Joule–Thomson coefficient, is not always positive.
Temperature at step 2 will not be T0 for any real gas.
In other words: This is a purely theoretical thing assuming ideal gas. It is still useful to understand the concept of work here.