According to the web standards, the H1 tag is only meant to appear once on the page (see https://www.w3schools.com/tags/tag_hn.asp).
Note: Only use one <h1> per page – this should represent the main heading/subject for the whole page. Also, do not skip heading levels – start with <h1>, then use <h2>, and so on.
Usually it used for the page title and it has no reason to appear anywhere else. Using H1 more than once is possible and the browser will render it, but it should not be done as per the web standards.
The page you referred me to has more than one H1 tag and is not considered a good practice.
Technically, it could be easily implemented into Joli TOC, but for the aforementioned reason, H1 tags are not processed at all.