(Hi - I planned to have a go at hacking in this feature, but thought I'd file this just in case anyone has any feedback on the idea, or beats me to it.)
I'd like archivemail to remove my mailboxes if, after archiving, there is no mail left in the mailbox. This might be tricky for some mailbox types, but should be easy enough for Maildirs (what I'm using).
One complexity would be recognising and removing (perhaps with further flag-configuration) mailboxes which have IMAPd index files within, e.g. dovecot-uidlist.
I've been keeping the downstream equivalent bug in Debian updated, so if you are curious, keep track of that. In short, the best way to do this IMHO is to enhance Python's mailbox library, port archivemail to the newer class hierarchy and to python 3.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736327