This is, I think, related to why Discourse by default doesn’t enable SVG display. We enabled it because of the widespread use of SVG for a few of our forum interest areas, but Discourse also “sanitizes” it to remove potentially dangerous parts to make it safer. That makes it reasonably safe to display (I hope) but also means that it’s not a great way to exchange SVGs for regular use, because they are not preserved unmodified.
Discourse does this by stripping out all elements that aren’t in an explicit allow list of known-safe elements. Doing this takes the interactivity out of the SVG, both javascript and CSS.
If the mail clients did the same thing for display of inline SVGs (but left attachments alone for those of us intentionally providing them for real uses) it would probably solve a large portion of this problem. There are quite a few libraries for “sanitizing” SVGs in different libraries, and all the ones I have looked at work by stripping out everything that isn’t explicitly allowed as “safe”.