To collect logs from the AKS container application insights can be enabled.
This automatically creates a deployment called ama-logs-rs
This deployment has an associated ConfigMap: ama-logs-rs-config
The Terraform resource for deploying the cluster and node pool does not have any options to configure any settings of the monitoring agent.
The suggestion from Microsoft seems to be to edit it manually, as described here
However, that does not ensure that for every node scaling event these settings are automatically transferred, which means that either you constantly have to manually check and update the ConfigMap, or write some custom job that does this periodically or based on some triggers.
Is there a better way to customize specific settings for the ama on AKS?

A custom config map is the way to go, but using the correct name is important.
The deployment that controls the ama pods has some default optional mounts, one of them is the config map "container-azm-ms-agentconfig"
By default the configmap does not exist, but if you create it, it is automatically picked up.
This is the very minimal configmap we used in the end:
kubectl describe deploy ama-logs-rsOUT