You both guys are today's lucky 10000! You can export entire gmail history with takeout and import the history locally to thunderbird. You can even make backup of it. Then delete everything and anything you want from the online gmail. Select 50 items at a time with "Select all" and delete page by page, go guys you can make it!
I'm using Thunderbird for the accounts I care about. I know I could hook into Gmail using IMAP. Just sayin' the Gmail UX for deleting is horrible and Thunderbird existing is no excuse for that.
Good solution. Then, how can I backup the Thunderbird store/DB/whatever so I can access it later?