An easier solution is to have set up a forwarder when you set up the original and caught all the emails you might need in an account you are keeping but that is the "should have taken backups" approach.
Some shared hosting type setups will allow migration packages, though they don't always make it that easy (if it was as easy as websites then they could not charge the renewal rates they do).
Still if they use the popular cpanel software and your new host uses it too then
https://www.recoverytools.com/blog/migrate-emails-from-cpanel-to-cpanel/
It is ultimately just files in such a setup plus some fiddling.
Something more custom requires something a bit more custom.
This is less for long term archival though (even if it would serve as such for many scenarios, might even be better in the case of some legal ones) and instead migration from one host to another.
Personally I would download a version of an email client, download whatever backup tool there is (
http://mozbackup.jasnapaka.com/ being one example, plenty of others, download the lot with a pop3 account as that will mean a local copy of everything (you can try local with imap but it is tricky and you have to make sure you are caching everything) and the backup the setup with your email backup tool before copying the backup file, the backup tool and the version all to a disc, possibly with some redundancy (go with something like par2
http://www.quickpar.org.uk/ ) and there you have it. That way you can restore it all as it was using versions you know to work in some years time if you want to, even if involves installing a VM or maybe going on
http://www.oldversion.com/ or
http://archive.mozilla.org/pub/thunderbird/releases/ or something to grab another OS' version of the same release.
I normally do a variation on this if migrating a client as well -- pop3 to their setup, setup new account on IMAP and move across. That way they also have another backup.
Indeed I will often do a dual IMAP and POP3 setup for a client if their email provider has a limit on inbox size and they want an archive of things.
Some online email providers might also provide such an option to merge accounts, though it is typically a paid for option if it is available at all.
A more elegant solution if you have multiple users on the email might be something like
http://davmail.sourceforge.net/ which does much the same thing but aiming at working for multiple people and local server setups, however we can skip that one for now.
I hope the "reasons" are nothing too serious. Sucks to lose that kind of work. If it some career advice type doing the "scrub yourself from the internet" routine then you do have options like temporarily disabling things. Not to mention if the "OMG you said a bad word and you are applying to my university, one for the reject pile here boys" set are at all competent then there are archives of many things as well.