If it’s effective, yes.
I think corporal punishment is fine as a last resort before expulsion. Not before, because I’m worried some kids would be traumatized, but those expelled or misbehaving indefinitely without consequence will otherwise find trauma and/or ruin other’s lives.