I wrote and shared uBlock Origin filters for Facebook, shared on Reddit and up to a week later they changed the DOM structure bypassed the filters. After some attempts I no longer publish the filters.
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.