I don't really know. To me its partly luck and partly good maintenance on the part of changing oil and oil filter often.
I also use STP Oil Treatment with every oil change which by my results has some possibility of helping. My Chevy S-10 has 345k on it with no engine work other than the water pump (and routine things like spark plugs, air filters, etc.) I have other vehicles with over 300K but I don't know the service history. The truck I've had from mile 000,003. Pretty amazing for a gasolene auto engine.
There is a bit of tapping noise on my 87 300D at idle but it goes away over about 1500 rpm. Its essentially what I expect from a diesel engine, a little more noise.
There are some threads here about replacing the brittle O-rings on the oil filter cover shaft - the thing that sticks down through the middle of the oil filter. Having fresh o-rings is thought to keep more oil up near the valve train when the engine is off, rather than have it leak down overnight.