I had the same problem on Kmail/Linux. I found a workaround, but haven't tested it yet on Opera Mail on Windows.
I enabled an App password and set the authentication method to "clear text" instead of PLAIN.
In addition to the "mail" folder, back up "contacts.adr" (your contacts). If you want to back up your passwords, also back up "wand.dat". Just note that both of those files are tied to that specific copy of the mail folder. See "Menu -> Help -> About Opera Mail" for the locations.
Note though that the files in your mail folder for the messages will be incomplete unless each message is downloaded in full. Using Low-bandwidth mode or choosing "do not download attachments" can affect this until you choose to show/fetch the complete message. Also, by default, Opera doesn't fetch an IMAP message in full until you open it. All these settings can be controlled on the "Incoming" tab in the account's properties.
Also note that if you were to replace your current mail folder, wand.dat and contacts.adr with the the backups, as soon as the IMAP account connects to the server, it'll sync. This means that any messages that are no longer on the server will be removed from the mail folder too. So, always use a "copy" of your backup mail folder when replacing and keep the original in a safe spot if your plan is to keep backups of the actual messages.
Now, with IMAP, since all your messages are on the server, if things got really messed up, you could always just delete/rename the current "mail" folder, start Opera up, add the accounts back in and everything from the server will sync fresh and nice-like. You lose labels you've created this way of course.
Also note that Opera doesn't upload IMAP messages that only exist in the "mail" folder (from a backup mail folder) back to the IMAP server. *If* you ever had to do something like that, you have to do a manual import into a local POP account and then drag them to the IMAP account's "Inbox" IMAP folder view. Don't worry about this now. Just an FYI.