The "coking" problem was a problem when most turbos did not have cooling water jackets around the bearing, gasoline or diesel.
Not unusual for a turbo to be spinning 125,000 - 200,000 RPM depending on the load.
Prior to water jackets, shutting down the engine after a heavy load could have the turbine spinning for a considerable time after shutdown. It is already hot, and the spinning turbine created additional heat without the benefit of the oil still pumped around the bearing. So, bearings overheat and the oil "cokes".
Basically the oil breaks down, forms solid deposits, blocks oil flow, bearing fails, turbo fails.
That is where the "let your turbo engine idle for a few minutes" came from.
When Chrysler first came out with the turbo charged 2.2L gasoline 4 cylinders, they were hot little engines, capable of quite a bit of power. The first versions had non water cooled turbos. It wasn't long before I was doing on average a turbo a month until the engines were updated to water cooled turbos.
Water cooling the oil helps quite a bit, even if you shutdown immediately. Although the oil is no longer being circulated, by convection the coolant around the bearing is, although nowhere near as much as with the engine running. There was at least one manufacturer that ran an electric water pump after shut down for this purpose, and those pumps were available on the aftermarket.
BTW, that convection circulation is exactly how your block heaters work. An element in the lower end of the engine heats the coolant and it slowly circulates.
Modern diesels are designed to be shut down after "normal" running. But that doesn't mean that any turbo'ed engine would not benefit from a "cool down" period.
I use a timer on my truck that allows for an approximate 2-2.5 minute run time after shutting down and removing the key.
Low grades of dino oil may "coke up" easier/sooner.
Synthetic oils tend not to coke because of the superior temperature capabilities, and the natural non coking properties.