Hehe, well, sometimes the best and quickest solutions come from the farums rather tha Apple. In my experience the best way to get a quick and complete support from Apple, is through the Genius Bar, not online. Those guys ate the Genius Bar are really geniuses.
When you delete any mail account on Mail, the mailboxes that will be deleted are the ones standard to the account, that is, the Inbox, Outbox, Sent and Trash mailboxes. If you have any content on them, it will be lost.
Those mailboxes are under "MAILBOXES" on the tree view, at the left of the Mail window.
The mailboxes created under "ON MY MAC" won't be deleted. You can either create a mailbox here and copy or move all messages you want to keep.
When restoring from the backup, will only restore the mailbox and not the account or its settings. Those recovered mailboxes will appear as "Time Machine" recovered mailboxes so they don't interfere with the current active accounts.
If you ask me, I will go with the firts choice: create a local mailbox and copy/move all the msgs there. Is faster and more organized than Time Machine.
Another thing you can do is first create the new IMAP/POP account before deleting the original. There is no problem in having two accounts with the same settings.
Once you are certain this account is working properly, move all the msgs to the new mailboxes and then delete the original account.
Regards.