I recently wanted to shift my mail from Account 1 to Account 2. I enabled POP in Account 1 for all mail, and set the option "Archive mail". In Account 2, in Accounts and Import, I added Account 1 in "POP3 accounts you own". All my mail went from Account 1 to 2, and all new mails were automatically forwarded. In Account 2, sent mails were in my inbox in the form of "Account 1 to recipient". Account 1 now had an empty inbox, but all sent mails were retained.
Now I want to undo this and revert my Gmail to its original state where everything is in Account 1. So I enabled POP in Account 2, and added Account 2 in my "POP3 accounts you own", and then disabled POP in Account 1. A few emails were sent back to Account 1. A lot of them were sent mails in the form of "me to recipient". After some time it stopped, and my import history showed that Account 1 was periodically checking Account 2 for mails, but "No Mails Were Fetched". I marked all the mails in Account 2 as unread, and more emails were fetched to Account 1, but they were all duplicates of those already in the inbox. Now, no more mails are being imported.
How do I make all my mails go back to Account 1 without losing any? And how do I safely delete Account 2 after that is done?