Yes what you describe is exactly what I’m doing. You don’t need any fancy apps for it, in fact it’s best if you keep it simple and do it all with IMAP.
Now, your email provider needs to support IMAP. Normally I wouldn’t even mention this but the so-called “encrypted mail” providers like Proton make you jump through hoops so it’s not a given. (Personally I never use a provider that doesn’t offer straight IMAP, smells too much of potential lock-in.)
You also want to self-host a private IMAP server. It’s the easiest way to handle things. Dovecot is pretty easy to set up and very good.
(You can sync to disk as plain text files if you want but you’ll have to choose a format, and actually using those files can be awkward. Syncing to a live IMAP is ideal IMO.)
Then you just use the mbsync or imapsync CLI tool on a schedule to bring in messages from the live mailbox(es) to the private ones.
You can also self-host a webmail app for the private IMAP server (I like Snappy and Roundcube) that you can access securely through a reverse proxy and search your emails or you can even configure it to send through the provider’s SMTP.
You can keep using other email clients with the live mailbox during this time.
after 2 weeks, emails are stored on some type of self-hosted service, leaving minimal footprint on the cloud?
Neither mbsync nor imapsync have this feature AFAIK so you’ll have to use a different tool for that.
I achieve this in my desktop email client (Claws Mail) which has this option for POP3.
If you want to script and automate this cleanup there are CLI tools that can do it, for example imapfilter (which takes a Lua config script) or you can put together a Python script using the imapclient library (available in pip).
Hope this helps.