With Google Apps Script, is it possible to remove empty (unused) Gmail labels?
Certainly, first use GmailApp.getUserLabels() to retrieve all the labels, then loop over them and use getThreads() to determine if a given label is empty, and finally use deleteLabel() to remove empty ones.
See:
https://developers.google.com/apps-script/reference/gmail/gmail-app
https://developers.google.com/apps-script/reference/gmail/gmail-label