Its important when discussing this issue to get the context right. I worked on a city site a few years back that had an older cat 307 (tail swing) and a late model 308CR. There was nothing between these machines in digging ability,
When you look at a hydraulic excavator in a trenching situation the work is done below a horizontal line through the Fulcrum. In other words the bucket is being pulled up from below the tracks and the angle of your lever is called a reflex angle (greater than 180). Surface area (track area), machine mass and grip/holding are going to be the factors that allow a machine to apply work to the bucket.
If, when the bucket is down in the trench, you drew a line from bucket up through the centre of the turntable (the fulcrum) and on up into the sky....as the line extends up past the turntable you could place the counterweight anywhere along that line and it wont make the slightest difference to the digging effort. It could be 1000 ft away, so long as the angle is reflex it wont make any difference.
However, when the operator lifts the bucket up above the fulcrum the angle becomes obtuse and the amount or work (weight) the machine can do whilst staying its tracks is proportional to the effort (counterweight) and its location in relation to the fulcrum. The hydraulic excavator complicates this simplification by not being a rigid lever and it applys effort from other angles.
At maximum extension over the side in the horizontal plane a tail swing excavator will generally be more stable than a ZTS. However, depending on the angle of stick the ZTS can sometimes lift more than a tail swing in closer because the weight is physically mounted lower and this makes the angle closer to a reflex than an obtuse or acute angle.
All this in theory, hydraulics aside, I have yet to operate a CR or ZTS machine that "felt" as stable as a tail swing machine.
And after that you come into manufacturer's specifications for bucket size/capacity, as well as stick lengths etc etc and a whole lot of other variables including track width, mass and so on.
When it comes to duty both the machines will dig and swing all day pretty much on par. If I was loading trucks all day on an open site I can't think for one reason why I would bother with a ZTS machine. If I was trenching all day I wouldn't give a toss what it was, unless I was next to a building. ...and if I was a mechanic........