is there a theoretical limit to the amount of sound energy air can contain? In case, there is a limit, what is that limit?
The answer depends on the pressure of the air, and as the comments point out the sound source. An extreme (theoretical max) loud sound source would pull basically a vacuum in the troughs and a double over pressure in the peak. It would seem that 1/N only makes sense for N=2, if the sound is to be considered more than just a single shot.
So you would calculate it in joules per metre**3 by working out something like the energy stored in air when you compress it by a factor of two. Pressure is 100kPa so to get to 200 kPa over a distance of 1/2 a metre would work out to 150kPa*0.5m*1m**2 = ...
Getting sound that loud is mechanically quite a trick, so if I wanted a real answer, I would scrub the net for the highest spl recorded and work from that. Like 160 dB?