Over the course of my maintenance of sphinx and sphinx extensions (including myst-parser, myst-nb and sphinx-needs)
the question of using headings within directives, or more generally nested inside other nodes of the docutils document
tree has come up multiple times.
To not have to repeat myself anymore, I decided to write this short doc, to explain why this is not possible (or at least generally a bad idea).
Lets take the following reStructuredText document as an example: