There are at least two things you can do to ensure you don’t lose old emails:
- On a Mac copy or move the emails from the ISP account to a local mailbox on the Mac - there are tips in Apple Support for this. ( Create or delete mailboxes in Mail on Mac – Apple Support (AU) ) The moved emails will only be accessible with Mac Mail (i.e not iPhone) but they will be backed up with Time Machine. I regularly archive old emails in this way to keep my iCloud mailbox a manageable size.
- Use an email archiving program like Mailsteward (https://mailsteward.com/) to archive selected mailboxes. Note that the emails are stored in a searchable database but they are not backwards compatible (they cannot be easily restored to an email account). I regularly use Mailsteward for this purpose and occasionally save the resulting database file to Bluray disk.
There are some more tips here:
Smart email archiving app? - #4 by deemery