`sphinxcontrib-httpexample` support in `plone-sphinx-theme`

I need help to get sphinxcontrib-httpexample to work with plone-sphinx-theme. This issue is a blocker to adopting plone-sphinx-theme for both plone.restapi and Plone 6 documentation.

The problem is documented with reproducible examples in an open issue and a pull request.

I have exhausted my knowledge of JavaScript and jQuery, and debugging this issue. I would greatly appreciate any help that you can provide.