Maybe a better approach is to convert the page to an image, run OCR over it, use an LLM to remove the ads, present the result to the user.
The only thing I'm proposing is to do the filtering on graphical data (what the user actually sees) rather than on the DOM (which can be obfuscated; and which may change every week).
Everything happens at the image level so there's no way Meta can obfuscate the DOM to make ads pass through.