First test results with the Polaroid filter: not bad, it determines its own masks based on damage markings and removes elements in that area by blending with the surroundings. So exactly what you need. Ok, if I open an image of several people and the filter then wants to remove someone's glasses as scratches, that's a bit overzealous, but the idea itself isn't bad in principle. I think I'll give that a try soon when I scan dusty negatives again.