I'd say the initial up charge is a safe bet to recover most or all of down the road on a well maintained clean used truck with reasonable miles on it. (If you put 350kmi on and then complain it's not worth 8 grand more than a gasser you're......nevermind)
This is regardless of what the economy does, again within reason of course.
Basic maint on any of them is not a deal breaker at all cost wise, unless you're the guy that gets talked into $200 oil changes and $400 fuel filters because "it's a turbo diesel."
And anymore, injectors aren't a concern like they used to be. I'd guesstimate the service life of them and other major "diesel" components like turbo and injection pump to be well over 200kmi.
Leaves the concern of the Bosch cp 4.2? on the Dmax and Pstroke, but I'm not well read enough on that problem and no personal experience with them.
Bottom line, a diesel "can" cost you more overall to own, and it may especially if spending big $ for occasional use.
Another thing one can't confuse is wear n tear failures or repairs needed by doing MORE with a diesel than could reasonably be done with a gasser. " I've been towing 22klbs out of wet hayfields every fall then running 90mph up the passes fully loaded in my tuned _________ to deliver the round bales 500 mi away with this ole smoky diesel and the pile of shizz keeps burning up these dmf clutches. Never buying a piece of c rap diesel again."
That's what some stories sound like and there's a lot of subjectivity in them.
I'm obviously square in the middle of the "diesel" side of the court, but no denying the current crop of gassers are very capable (not the best, but capable) of many years and miles of work towing stuff in the 10klb range or a bit more, recreationally.