You can apply little transforms by just writing XML transformation on configuration files. For instance here is one for adding a section to the
system.web section of the configuration file
Here is one for removing an attribute
How about changing an attribute based on matching the key?
If you happen to be using Octopus Deploy they have a feature you can add to your IIS deployment task to run these transformations
There is a great little online testing tool at https://elmah.io/tools/webconfig-transformation-tester/ where you can plug in random things until you get them working.