Would really like to have this feature in Discourse.
@tobiaseigen was something developed to generate the ToC in this post? Oh I guess not (after re-reading the post).
https://community.namati.org/t/faq-frequently-asked-questions-about-the-network-platform/1467#tour
There are ruby libraries that seem to have the feature built in, to parse markdown and generate a ToC: