As you suggest, transferring mail via IMAP can be complicated by dual-factor authentication. To complicate matters, dual factor authentication methods have changed over time, and will continue to change. We'll continue to investigate solutions for specific services that implement dual-factor authentication. In the mean time, the simplest solution (and in general, the preferred method) is to download the mail as MBOX if possible -- either through an export mechanism (such as Google Takeout) or by using an email client to create a locally stored copy.
ePADD Community Manager