You would need to check if the new provider offers any way to directly transfer the IMAP folders from the original service.
If the original service allows POP3 connections for receiving emails, then an email client running on your computer configured for a POP3 connection would download and locally save all of the received emails on the server. You could have the email client set to not remove the emails from the server when downloading. That would allow you to double-check that you are not missing any received emails for any reason.
If the original service allows POP3 connections for receiving emails, then an email client running on your computer configured for a POP3 connection would download and locally save all of the received emails on the server. You could have the email client set to not remove the emails from the server when downloading. That would allow you to double-check that you are not missing any received emails for any reason.