I thought this was possible to do with CEL but it looks like this has barely reached alpha: https://kubernetes.io/docs/reference/access-authn-authz/muta...
Webhooks like yours will still be needed for a while (or programmable frameworks like Kyverno).