FWIW, I've had a few diesel engineers tell me that total fuel consumption is a more accurate measurement of the life of an engine. This makes sense; an engine that's been run lightly (not WOT all the time) will have consumed less fuel. On the other hand, an engine that's been run hard at or near WOT will have consumed a lot of fuel.
It comes down to physics. More fuel consumed = more thermal and physical stresses have been placed on the engine, both moving and stationary parts.
In conversations with diesel engineers over the years, I've had a few mention to me the rated service lives in terms of total fuel consumed of various mid-sized pleasure boat engines (in the 5-8 liter displacement range), which have ranged from 30,000-50,000 gallons. How that might translate into hours again depends on how it's been run. An engine with a nominal 35,000 gallon service life, used gently at say around 3 GPH could theoretically = >10,000 hours. On the other hand, the same engine run at 80% of WOT most of the time and 15 GPH might last 2,500 hours.
Some people have the what I believe is misconception that 'diesel engines last forever'. I think that perception may have been formed from the old-school diesels, like the venerable Detroit 6-71 in its original, naturally aspirated form. That was a 426 cu in 2,200 lb beast that put out all of 165 hp. Yes, it was primitive, but also over-built and massively under-stressed. I've heard stories of those engines lasting 20,000+ hours.
Many modern diesel engines are different animals. They are much lighter, more "efficient", but also more highly stressed. Many are turbocharged to within an inch of their lives, which increases power output, as well as fuel consumption, and correspondingly shortens service life. Consider the Yanmar 6LPA, 256 cu in, 899 lbs, yet produces 315 hp, or the 6LY at 354 cu in and up to 480 hp and only 1,179 lbs - half the weight of the 6-71 yet three times the power output. An engine like that is certainly more efficient, but won't last as long.
The almost as venerable CAT3208, 636 cu in, might be putting out 210 hp, or 435 hp. The latter will use more fuel and generally have a shorter life than the former.
Throw in the major variables of how an engine has been maintained, how it's been operated, and the answer is, it depends, and varies widely.
The late David Pascoe, marine surveyor (yes, I know, his name can be controversial and some people disagree with his views, but I've found that's sometimes because he's saying things they don't want to hear) has written on the topic. Some of his writings are still up on the yachtsurvey website:
https://www.yachtsurvey.com/engines.htm