There is no flag for this at the moment but you can manually remove them from the DAR if you want without any effect. The ledger only cares about the manifest and the .dalf files referenced from the manifest.
Keep in mind though that Daml-LF is deliberately not intended to obfuscate your code: Parties that interact with a template should know what they’re interacting with.