How can I dynamically remove some unwanted formatting tags inside rich text fields?
Not a "real" answer because it won't fix your actual content, but I wrote a plugin that would make it easy to remedy your issue on the front end (i.e. in the template) –

To remove all &lt;h1&gt; and &lt;h2&gt; tags (content inside tags will not be removed):

{{ entry.someRedactorField|retconChange(['h1','h2'], false) }}


To change &lt;h1&gt; and &lt;h2&gt; tags into &lt;p&gt; tags:

{{ entry.someRedactorField|retconChange(['h1','h2'], 'p') }}


You can read more about the rectonChange filter used in the two examples above here.