The project I am working on involves reading a lot of service endpoints (url) from a config file. Since the list would be quite large I decided to keep them in a custom conf
Since the OP asked about Web.config transformations during the deployment lets assume a WPP is already in there. So I've hacked on the WPP.
I use the following snippet to transform Umbraco's own config files (but indeed any configs suit well):
Config\umbracoSettings.config
$(CollectWebConfigsToTransformDependsOn);
CollectUmbracoConfigsToTransform
false
$([System.String]::new($(WebPublishPipelineProjectDirectory)\$([System.IO.Path]::GetDirectoryName($([System.String]::new(%(DestinationRelativePath)))))).TrimEnd('\'))\%(Filename).$(Configuration)%(Extension)
$(TransformWebConfigIntermediateLocation)\original
$(TransformWebConfigIntermediateLocation)\assist
$(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)
$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))
I name it Umbraco.wpp.targets and drop inside project's root. The the WPP automatically imports it.
All you have then to do is add a transform file (Config\umbracoSettings.Release.config is case of this sample).