With POP all your mail downloaded to your computer is ON your computer and noramlly removed from the Mail providers servers. If you Delete the account it will Wipe out all that downloaded mail removing the Inbox and Sent mail folders and also if you have created any Subfolders for Saving/Archiving mail INSIDE that accounts main folders it will also delete all those.
That is why you have to SAVE your mail to some higher level folder system in the mail program, Copy And Paste it to separate folders.
Sorry I am not that familiar with Apple/Mac Mail as I don't use it (In my option it is a piece of Junk program) so I'm not sure how it really works. But with any other Mail program I have ever used you can create folders that are Not really associated with any One Account. That is where you want to create these new folders and save you Gmail Mail to them. So they do not get deleted when you delete the account.
Once you do that and then Delete and recreate the Gmail account you can then Copy back those emails to the Gmail folders of the newly created account and they will get put back on the Gmail servers.
Now this is how it works with Thunderbird but with Apple/Mac Mail I'm not sure just how it works and talks to the IMAP servers. There are reports of Apple/Mac Mail just deleting emails for no good reason. One time you open the program all your mail is there and the next time you open it, whether within a few minutes or days, all the mail is just gone.
Also it seems from what I read that Mac Mail doesn't really communicate well with any IMAP servers.
All I can say is Good Luck.