We do a reasonable job of checking that links to local markdown files are valid. However, the standard pattern for linking to sections is to use anchors in headers. This doesn't work well if the title is moved or renamed.
With the TOC code, we should be able to keep a set of valid anchors for each page and verify it with that.