I tried to use Nextcloud's email app to backup my gmail, but after sending it up I realized that it is just an alternate interface to access email on Google's server, not a proper backup solution. (It only supports IMAP, not POP3.)
If I can't find a better solution, I may just set up Thunderbird and put it and POP3 mode, but I'd really prefer something that could sit on a server and run automatically without me having to touch it.
(For what it's worth, I ended up keeping my Nextcloud server set up because I found that I really like the notes app. I also have it doing a daily backup of my contacts from my phone and it's replaced Dropbox for small file storage. I already had my photos backing up to a Plex instance on the same server, or else I would probably be using the photo backup feature as well. )