Let's clear something up here.
The D22 is a narrower car than the D40, so its wheel track isn't as wide - the D40 is more stable and has less inclination to roll.
The D40 has a longer wheelbase than the D22, so its ramp-over isn't as good. The stock 2011 D40 is a few mm higher than the D22.
Both vehicles can be raised to the legal limit (or beyond). Both vehicles can have larger tyres fitted with modifications to the front guard area.
The D22 has less power than the D40 but both can be chipped to provide more power, the D22 coming up close to the D40 but not quite reaching it.
The D22 doesn't have a front e-lokka option yet, the D40 does.
So, in summary: there's very little difference between the two, but the D40 in all reality is NOT a worse vehicle off-road than the D22. The D40 does cost a fair bit more, so for the $ spent the D22 would come out on top.
But in terms of pure ability, neither would really outshine the other - they both have weaknesses that require modification to get past.
Up at the muster there were both 22's and 40's on the tracks and they all did well. Not the toughest tracks around, to be sure, but you couldn't walk away from the event and honestly say that one or the other was streets ahead, if you considered the mods etc.