Thanks @pfaffman for your encouraging comments.
Yes, it is ‘topics’ not ‘posts’.
Want this as a plugin because this data can be used to build a navigation graph e.g. like in expii.com.
I will explore https://meta.discourse.org/t/knowledge-base-plugin/115288 by @angus to see if topics are sequenced there.