Had this problem last week and it only happens to the 3.0 l diesel when warm and switched off for a few minutes. Its quite a complicated system and the switching path for power to the starter motor. Your ingnition switch sends a signal to kessy(immobeliser Control Unit) and kessy then switch the starter relay in the fuse box in left of the plenum chamber.
That relay then switch power to the starter solinoid who then kicks the starter motor into life.
It could be any thing from a control unit to a relay to wiring to the starter motor that could cause this issue.
A faulty battery - no then the engine would crank slow or not at all or the battery would go flat and charging sufficiently.
What i found or thought could be the problem were the power supply relay in the fuse box. the supply side of the relay (Terminal 30 ) were quite loose fitting into the female end into the fuse box. So i stuck a small screw driver into the connectors and bend the pins a little bit closer, so its a nice and tight fit in there.
I thought the engine cranked a little bit faster after that.
I ask the customer to phoned me back as soon as it happens again , but no word so far. So i can only assume its fixed