There does not seem to be a way of adding templates to a solution so you need figure out a way to move templates from one environment to another. You could do this manually or write some code using the DocumentTemplate entity in the 2016 SDK.
Also you cannot modify or export a template that you have loaded in CRM so you need to ensure you keep your original template in a safe place in case you ever want to change it. Alternatively write some code to retrieve it and save it out to a file. Below is a snippet of code that will retrieve all the document templates and writes them to the c:temp folder. It uses the document type to determine the file type to apply.