Many other third-party tools are available in the web market, but only a few are reliable. I want to suggest the
MacSonik Gmail Backup tool that helps to back up Gmail mailboxes into various file formats like PST, PDF, MBOX, EML, MSG, etc. on Mac. The software allows you to back up Gmail emails with or without attachments. It also maintains the folder hierarchy throughout the conversion process.