Problem
Having configured Outlook to download all of my Yahoo Mail messages over IMAP, I noticed that most of my older messages were missing. My Inbox showed 10,000 messages, which is a suspiciously round number. Sending a test email from another account resulted in the message count momentarily dropping to 9,999, then back up to 10,000.
Solution
Changing the IMAP server from imap.mail.yahoo.com to export.imap.mail.yahoo.com seems to have resolved the problem. I now have all 15-something thousand messages synchronized.