I have proposed a fix for the problem I found, but from everything I’ve found so far the component that was performing the mangling only affects the saved record and doesn’t affect the incoming mail during processing.
https://github.com/discourse/discourse/pull/37125
I’m reasonably confident the source of the trouble must be something else, but I don’t yet know what it might be.