That works for terrains, but I don't think clouds. There is a way that doesn't involve true Z-Depth, but should be good for most comp'ing purposes:
Switch off all shadows, GI, raytracing for anything and everything, and anything else that'll slow down your render, etc, without affecting quality in a greyscale depth pass.
Go to the Atmosphere and click on the Tweaks tab. Make the Ambient colour white. Go to your Sun and switch it off completely, and the same for any other lights. Switch off your environment lighting as well. You should see a difference straight away. By playing with the Atmosphere's Height Control and Density sliders you should get a result you're after (very low density coupled with very high exponential height). I also prefer to use only Haze or Bluesky (the former usually), so I take one or the other down to zero.
You can save all of that as a TGC if you want, to use on other setups and projects.