The timing is a result of a sort of solenoid moving a kind of internal "piston". ( the famous ICV INJ-TIMING pwm value - that you can read with a consult-compatible cable like the ECUtalk cable - which is nothing else but the 12V pwm duty cycle applied by the pump electronics to the Advance Solenoid).
This piston can seize for lack of lubricant (hence the 2 St oil we add to the diesel) and/or heat and/or water and/or air ingress.
Unless your filter was not doing its job, normally dirt should not get through but water or air would.
Due to wear and tear, the ICV ( Injection Control Valve) pwm value is no longer at the right value and deteriorates from its normal 40 to 50% when idle (depending upon if the motor is cold or warm). This is a sign that end of life is getting close.
Apparently your ICV when idle was totally out of its expected range ( as reported by your mechanic).
You may try to clean you IP by running a special cleaner mixed with clean diesel in close circuit as advised elsewhere by
@geeyoutoo, adding a good amount 2st oil to lubricate properly. And see how it goes. But usually, it is too late...