Conditional AMP rendering

As I said, the filter would then automatically replace every tag.

An alternative would be this here: Deactivate specific tag (or plugin) on AMP version - #2 by Pascalmh

You could also extend the tag.