Quick update here. I merged these two PRs last week. First, the fix so that tagging does not need to be enabled for archiving and deleting to work:
https://github.com/discourse/discourse/pull/10426
Second, I am now writing all IMAP logs to the database for easier inspection. A job will be run daily to delete logs > 5 days old: