How about adding a flag to the emails that are processed? It's fairly well supported.
I needed this when i was working on my engineering project, and added 'processed' flags for already processed items. This way i could query all unprocessed items with "UNSEEN UNKEYWORD <flag>".
This is a good plan, probably a notch better than using UIDs. You can use UIDs as a cursor to the server as a hint to speed up the operation if that’s what you meant in the other thread, and that’s a great thing to do.