In the document that contains the table of contents, you can insert RD fields that reference each of the separate documents from which Word should fetch the headings.
See
Field codes: RD (Referenced Document) field - Microsoft Support.
A simpler way is to reference the separate documents with INCLUDETEXT fields, though. You can use the Insert File dialog box and especially the Insert as Link option.