Hey Bearfan87! Glad to hear you were able to work it out! What you said makes sense, I find that when this happens, “Moving Messages”, that doesn’t progress, you’re right, it usually means there’s an email jamming up the system, preventing the native Mail app indexing to complete! Good thing you were able to find the culprit!
Otherwise, if the standard steps don’t work out, I find this works 99% of the time. (Like you said, make sure there’s a back up of the data and the mailboxes exported, especially POP account):
Note: that is you do a Finder, or Spotlight search, and no results appear or it just loads, or says “Indexing” for longer than a day, it’s better to follow this article:
https://support.apple.com/en-us/HT201716
Anyhow:
Quit Mail app.
Open Finder.
Too menu click Go.
Press and hold Option on the keyboard and you’ll see the ~Library appear, click on that.
Open the Mail folder.
Then open V7 (Older OS May say V6 v5 etc.
Open Mail Data folder.
Delete all the files that begin with Envelope Index.
I also typically clear from the library:
Saved Application State > com.apple.mail.
which prevents the previously open windows from opening if necessary.
Re launch Mail app. Don’t be alarmed, it will look as if new and start importing your messages again, fixing the indexing issue.
If you’re missing any mailboxes, you can just import the exported mailboxes you saved earlier, or restore from your backup, but typically I’ve never had trouble with these steps.
(OS is always changing though, as far as I know older OS’ and up to Catalina, these steps work fine. they may not in future OS’ though.
Anyhow all the best!
Export / Import Mailboxes:
https://support.apple.com/guide/mail/import-or-export-mailboxes-mlhlp1030/mac
Backup using Time Machine:
https://support.apple.com/en-us/HT201250