Might be a good idea to switch to an IMAP client instead?
What's a decent IMAP client that supports labels properly?
I use notmuch[1] with lieer[2]. Notmuch maintains a tags database with full-text search indexing for a set of maildirs, and Lieer uses the GMail API to synchronize messages with a maildir and labels with notmuch tags. There are lots of notmuch frontends available, but I use the built-in Emacs frontend.