I worked in a lab with Cummins powered test cells for transmission testing. When I started there they would run the engines at full power and when thru with the test immediately shut them down. If you went to restart them within 2 minutes they would crank over very slow because the pistons would start to seize in the bores and they lost several engines to scored pistons/cylinders. A mandatory 5 minute idle was implemented to allow the engine/turbo to cool and normalize which eliminated the piston scouring. This also allows the turbo to cool which would be cherry red.
I idle 5 minutes only if I’m working my truck under heavy load.
Idleing over 5 minutes will not harm a hot/warm engine. A diesel generates very little heat when idleing in cool weather and in very cold weather can cool to the point where condensation formes in the engine and valves stick in the guides.