Just a thought: You can use a third party software such as Thunderbird to fetch all the emails and then simply drag and drop into the Gmail account also connected to the same Thunderbird client. I have found that Thunderbird seems to preserve file structure and labels, and auto creates more if they don't exist.
Worth a shot!