Is excommunication a form of persecution?

No, it is not a form of persecution but a form of discipline.