I've got a PR to add a Table of Contents block into core. It automatically creates links to headings with ids/anchors (but doesn't create the anchors itself... that's something that should be handled by a change to the Heading block), it supports multi-page posts (including a toggle to only show headings from the page that the block appears on), and can be quickly converted into a static List block for further customization.

All it needs is some feedback on the naming (e.g. "Table of Contents" versus "Document Outline"), some code reviews to ensure the technical implementation is sound, and a fix for a block-selection bug that currently exists but is unrelated to the PR itself.