it will be even more ideal if the refund process is automatic and doesn't require the technical department to get involved if the exchange input doesn't pass the AML verification.
You have a point, but I see two issues with having an automated refund process:
Automation is the problem here. Automatic AML checking stops the swap process (marks the funds as risky because some earlier AI bot found a link to tainted coins), now the user still needs to decide if they want to do AML, and possibly a refund. Too many automated conditions for a sensitive matter.