Depending on your specific needs, you probably want one of imapsync, isync/mbsync, or OfflineIMAP. You could also use mutt or Thunderbird or the client of your choice to connect to both servers and move items through the UI.
If you have file-level access to the mail servers, any kind of file transfer of the maildirs should work. But from your description I'd encourage you to spend some time looking at imapsync, I think it's the closest fit to what you're wanting to do.
In this article https://anarc.at/blog/2021-11-21-mbsync-vs-offlineimap/ the author observes missing emails with both of them.
And I thought neither tool supported upload, am I mistaken?
Is simply using rsync to transfer the mail folders from one Maildir-based email server to another a viable approach?