Had the same issue with my Miele W524 not pumping all the water out, despite the pump working, the filter being clear and the main pipes to and from the pump also seeming to be clear.
I did find it tricky to get to the upper connection of the vent pipe onto the Y connection, so unbolted the spring hanger that was in the way (had to lever the drum up, to bolt the spring hanger back). The pipe was full of sludge. Also pulled out the other pipe that goes from the Y connection to the outlet at the rear, which was also full of sludge.
Doubt I’d have found the problem if I hadn’t stumbled on this post, so thank you.