One account I transitioned had 26K messages with 13K unread. Only about 9K/5K showed up in MacOS Mail app, but they were all there in Yahoo webmail. I tried waiting in case it was just taking a really long time to synchronize the messages. Nope.
I have had partial success by creating folders in the webmail interface (I did one for each year) and copying the applicable messages into their folders. Each year had fewer than 3K unread messages. Then when I switched back to the Mac Mail app and the rest of the e-mails appear to have synchronized.
Now my issue is I’m having trouble moving messages from those new folders for further sorting. I’m trying to create a “business” folder, and then move the stuff that is obviously from companies into that so the user can more easily start purging messages they do not need. The strange thing is, most of the messages keep popping back to the year folder. It looks like they move, but either immediately or after a few minutes, it is back where it was. I can only assume it is related to the IMAP synchronization, but I can’t figure out why. I have never had trouble moving messages in IMAP before, but I haven’t used Yahoo IMAP (I used to use POP when I had Yahoo back in the day) We don’t want to do the purging in webmail or the Yahoo Mail app. We are accustomed to Mac Mail.
But, I recommend trying to create a few folders in Yahoo webmail and moving a bunch messages there to see if it changes what downloads to your Mail app. I’d be curious what your results are, and what operating system you are using.