We have built an numbered heading app for Confluence. It's surprisingly complicated, even if you get it to work once, what happens when you update add/delete a heading. Nobody wants to pay for an app, myself included, but if you are dealing with public pages, example Confluence is popular for technical documentation..
5 apps on the Atlassian Marketplace, but only 3 companies, ie 2 have 2 apps and prices vary a lot.