This is Salix alba's idea about how to deal with the problem of multiple blocks of TemplateData spread across multiple pages (e.g., on both Tempate:Foo and Template:Foo/doc):
Issue a warning if another page with the same base name has template data. You can use easily use an api call https://en.wikipedia.org/w/api.php?action=query&list=pageswithprop&pwppropname=templatedata&pwpprop=title&format=json&pwplimit=50] to find which pages have template data.
Version: unspecified
Severity: enhancement