Thank you for reaching out.
Based on your points mentioned above.
If this header does not exist, create it ("correlation-id") using the value generated by the AG in the field
Currently assigning the x-appgw-trace-id value to a custom-header is not supported in Application Gateway. If you wish to add this as a feature, it will help if you can create a feedback item for this request on our feedback portal.
Alternatively, I realized you question was tagged with Azure API Management service. If you are using Azure APIM service in your set-up. You can use APIM policies to add a correlation id to your request as described in your points above . You can refer to this sample described here.
Hope this helps! Please let me know if you have any additional questions. Thank you!
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.