Custom ILM policies for APM DataStreams

I have the similar requirement for logs and metrics also. But this is too much of over head maintenance for the APM functionality users. I believe most of the enterprises will have a similar requirement to manage data per environment differently (I see another post here Indexing Application Trace Data into Separate Indices Based on Application Names - Elastic Observability / APM - Discuss the Elastic Stack). So is there any other way to achieve this (may be future release) ?

I am thinking about allowing variable configuration in component templates like below. And parse and apply the data from the first data stream creation.

Its is good to have the apm templates as managed instead of cloning and maintaining.

image