According to the template syntax it looks like Conga Composer uses Aspose.Words and it's Mail Merge feature. If so, you can try using MailMergeCleanupOptions.RemoveEmptyParagraphs
and MailMergeCleanupOptions.RemoveContainingFields
: https://reference.aspose.com/words/net/aspose.words.mailmerging/mailmergecleanupoptions/