the problem for an import like this is that the account will be deleted and lose the original.
The goal is to make a local backup and then put back on Gmail.
In this case, you have to do this in manual mode.
- Download and install a mail client (Thunderbird for example)
- Set up the Gmail account on this IMAP client: https://support.google.com/mail/troubleshooter/1668960?hl=en
- Configure the 2nd account on which you have to do operations
- Move emails from one account to another
- WAIT for everything to be synchronized before closing the mail client.