I have been advised to research on how to use the Interapp class to make bulk changes to multiple alarm templates at once but I don't really know how to use it or how it works. I know there is documentation about this on this website, but I am still not hundred percent on its workings.
I am not sure if InterApp calls are strictly needed for your use case but they work so that you have a messaging mechanism between different elements or an automation script and an element.
You can use them to send a message to each element and have them assign the template to itself.
You can read about InterApp messages on this page (InterApp classes | DataMiner Docs) and its linked articles.
Then with the IDmsElement object, you can assign a different template to each of your elements via the AlarmTemplate property.
Hope this was useful.