At any rate I really appreciate if you look into this behavior.
I've had a look into this & have an initial set of changes for the next wacup build though how well it'll actually work for your needs I don't know. I've also not done any comparison testing against a winamp install as what it does really doesn't help in comparison to my code base & what I'm working with.
From what I could see under testing, wacup being slow to respond &/or duplicating things was due to how the initial batch handling is done which actually is processing the external command quickly but is causing all of the play message requests to stack up which depending on how many are made & other aspects I could easily make it take almost a minute for the wanted action to appear to finally happen. As it's trying to process every play request that's been given to it along with the related stop that goes on which slows down the ui responsiveness & makes it seem like there's no playback happening even though the play/stop is actually being processed with the stop happening before output is able to be properly constructed making it not play anything in that state (which is imho correct as it's just the handling dealing with things as quickly as it can & avoiding doing things that it's already determining aren't required as a very quick play then stop action will trigger).
What I've done is now try to check if there's already a pending play action in the message queue from any new external actions coming in & filter them to reduce the amount of reprocessing that might occur. Doing that helps avoid the unwanted adding of the items to the playlist when it should just be showing what's been added into it along with reducing the play messages that are being queued up which avoids what I described in the prior paragraph. I still don't know if that's fully resolved the extra items being added but so far I've not managed to see it occur including when using the behaviour that allows a folder to be passed & expanded so to me it seems better against what I've been able to test.
And final thing for now is that
/clear <file> isn't a valid command-line action so that shouldn't have worked & seemed like it did due to what I've tried to describe above.