I'm still pointing the finger of blame on the drain pump. The reason for this conclusion is straightforward enough when you realise the exact function of the pump. It has a DC motor and is controlled by the main circuit board. The circuit board constantly measures the current drawn by the pump and if it goes beyond the preset parameters the circuit board stops and then starts the pump (on-off-on-off....etc) in the hope of clearing what it believes is a blockage. If it fails to detect a reduction in current drawn then the circuit board shuts down and displays the E24 error.
Based on that knowledge I would conclude that the pump itself is worn and draws too much current from a cold start. Once it gets up and running it works just fine. Until the next time when it has not been used for a number of hours (between wash cycles).
Opening and closing the door may simply cause an interruption in the drain pump control process sufficient to override the problem.
That's my theory anyway and I'm sure a new drain pump will cure all.