Consider saving optional parts as AutoText entries in your template. Put bookmarks where they are to be inserted.
Use a Userform as a checklist for the optional sections. The Userform can insert the parts needed as desired. Update your TOC after insertions are made.
The Table of Contents in Word is a Field. It contains hyperlinks to actual places in the document but cannot contain controls to turn them on or off.
Generating a Table of Contents - Complex Documents
Automated Boilerplate Using Microsoft Word