Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
One useful detail is that some emails can't have their attachments removed; this also happens in the Thunderbird solution, so there must be a reason. Those emails will survive the whole process untouched. The good part is that when reuploaded to Gmail, it recognizes that those emails are still the same. But now they will have both the bigattachments and bigattachmentsRemoved flags, so now it is easy to recognise them as problematic and decide what to do with them. (In my case these are all old bank emails with PDFs attached, so I can just delete them all)
IMO, the point about the local copy being necessary to avoid the problem of the original email being kept should be highlighted at the very beginning. Else, it's easy to think that this is overly complicated just to be safe for beginners. One thinks "I can do this easier" and ends up having to rediscover the whole problem and solution.
@AlexRoberts Found the same trouble. Look at Aaron's answer (webapps.stackexchange.com/a/166429/340214), it does fix it. The easiest way is to go through a local copy so that you keep control of where the modified emails are.
Thank you lots for the last paragraph; I thought those local steps were unnecessary, so I tried just applying "Remove Attachments", which at first seemed to work but then does weird stuff because of the Gmail behavior you mention + some visual deduplication that Mail.app itself seems to do, which makes the thinned emails invisible on the desktop. It ends up looking like the attachments get deleted but then somehow are resurrected. After trying for a good while to save steps by using Gmail labels, I think your local steps are actually the best option.