I am not anymore 'hell-bent'.
It was just so that I spent some time to figure out that XPath solution. Then starting with sigil (because of the fine inline ToC ID creation there) to get confronted with the non-existence of XPath. That was too much.
Today afternoon I changed already to <hx> tags, got it checked and validated.
@KevinH: Sorry, there is
no big MINUS, not even a small one.