Is really need the ability to remove an object by it's UID. Perhaps a pickby UID condition with a remove action, or perhaps a Remove object by uid(uid).
Failing that a set visibility or active state by UID.
Failing that maybe using objects of one type but with multiple frame sets, that way I would be removing a known object type that appeared to be different ones.
Develop games in your browser. Powerful, performant & highly capable.
I hope this commented capx answers your question.
There are more details about picking in the section "Picking/selecting instance(s)" of the how do I FAQ.