Well, the ultimate solution here is to figure out what's causing OE to choke on that one folder. Does OE actually stop at that point and does it just display a message saying it cannot compact a particular folder and then proceed on to the next folder? Can you post a screen print of the message OE displays when it's compacting and gets to that point where it stops? Do you have a large number of messages and/or messages with huge attachments of photos embedded in them, in the folder that's causing OE to display the message?
Compacting is a normal OE procedure; by default, it will start upon every 100th closing of OE. Again, you should try to resolve the underlying cause, not circumvent the procedure.
Note: I'll be away from my computer much of the day today but will check back here later.