I just realized that by attempting to hack IDLE support around mbsync, I was basically reinventing OfflineIMAP. Hurray me.
(I had actually considered OfflineIMAP when I was initially looking for an IMAP sync-er, but most of the comments out there painted it as a clunkier, buggier, unmaintained alternative. After taking a second look, this doesn't seem to be the case, at least not in the current version. I guess I'll have to give it a try and see for myself.)