As far as I see it, there’s a way, but it would impact the structure of your CMS too much, and induce limitations in how you freely create a new post, forcing you to respect a certain structure and volume.
Unless someone comes with a better adive, I recommend you have that feature developped by a developer, using Javascript. The script would parse the post, locate where the H2 and H3, add IDs to the appropriate elements, then populate a box at the top of the page, that you would have designed, with the list of links gathered from the page. This way you’re keeping your CMS simple and all your options to write your post inside of a unique and lengthy RT element.
Such a JS shouldn’t be too complex nor too expensive.
However, as you can see, when you click the links in the table of contents it prefixes ‘toc’ to both the links and creates a tag rather than having the IDs attached to the header elements.
I’ve tried removing the prefix line from the javascript, but it didn’t have any effect.
Where as it seems Webflow themselves are able to make this work in their University CMS without the prefix - so the hashed URLs look cleaner, and IDs are attached to the actual H2s.