Automatically remove old (merged) branches from mirrored Git Repo

Short intro: We have a gitlab instance running in our on-prem infrastructure. Our gitlab project is mirrored from/to AWS Workspaces because there is no direct connection to our on-prem possible.

As the Git repo for our project is mirrored from AWS, branches that are merged with GitLab are not automatically deleted (or re-mirrored afterwards). It would be nice if there is a way to cleanup old branches automatically. Any hint to do this?