The lock-in of email platforms is the address. With IMAP you can extract the messages right away and migrate. Yet, you would still have to check the old mailbox for stray emails that you must tell to reach you on the new address. And continue doing so for years or risk missing some critical email.
Coincidentally, bringing your own address that can be migrates away is somewhere between impossible and expensive.
Disregarding the grandfathered free accounts, own domain is $7.20/user/month on gmail, €5/month on Proton. On microsoft that's business tier feature and AFAIK not supported at all on Yahoo.
Coincidentally, bringing your own address that can be migrates away is somewhere between impossible and expensive.