Revoking citizenship is illegal under the Geneva convention and the Convention on the Reduction of Statelessness. Signatory countries aren’t allowed to intentionally make a person stateless. It is actually a big problem that has been abused several times throughout history. Nazi’s revoking Jewish citizenship is a prime example. More recently, we have the Uyghur Muslims in China.
The issue with revoking citizenship as a punishment is that it only pushes the burden of citizenship onto another country. It also removes any kinds of legal protections that a citizen may have had. Imagine if a country only allows citizens a right to an attorney. All that country would need to do to remove your legal council is strip your citizenship. Even if you later manage to get the citizenship back, you’ve still lost your original court case because you were forced to go through it without a lawyer.