What is all this for? You go to all this effort to merge categories in a way that isn't very useful, and then you leave the old category in there?

Remove all and then add all is not necessary. Nobody is ever going to add an already existing event to the category again.

Just check for an old category, and if it's there then add the newEvents to it and return.