This is a good question. My reply is mostly for smaller Yachts 100 and below but does apply to "ALL" engines.
Anyhow, Wish I had a few days to reply to this thread. Being a Diesel Engine Survey and mechanic for the past 25 years I have learned mucho and it would take days to honestly reply to engine longevity question.
The main factor and most over looked cause for shortened engine life is engine load, mostly caused by oversized props. Make sure your props are the proper size. The way to check this is run the vessel at full throttle under full load conditions (full fuel, water, personal items, etc.) if your full-load RPM'S are below factory recommendations then re-pitch or re-size your props as needed to allow your engine to run efficiently. Even if you never run your engines at full-load your still overloading your engines at cruse or below with oversized props. Does your transom turn black? Its really simple, overloaded engines burn more fuel which will shorten engine life expectancy. As for engine life, the only sure fire way to determine engine life is how much fuel goes through her. Keep in mind, an overloaded engine burns more fuel then a happy one!
Inactive engine = Not good
Idle your “High Performance” engine at the dock for more the a few min=Not good
Changing your oil at factory recommended intervals, most are around 200 hours= Not good. 100 hours= GOOD!, Oil is cheep insurance.
There are many more factors, these are just a few.
Just my 2 cents which aint worth a penny