xhtml_container_stack::__desctruct() is called during normal shutdown sequence, it is called when somebody just forgets to call $OUTPUT->footer() but it fails when exception is thrown in the output lib, it also fails badly in CLI scripts if you somehow get xhtml_container_stack instantiated.
I do not think that the single case of missing print_footer() is worth the potential problems. The opencontainers method itself is not reliable because it can not fix general open html tags. The opencontainers is itself very ugly hack we developed because people often abused print_error(). It helps with coding problems too, but I think it would be enough to do the test in regular print_footer()
If we really want this feature we have to use some defines (globals would not work) to indicate that the page is not HTML or that the bootstrap_renderer already printed error. We would also have to make sure that the $this->opencontainers actually has valid value - I doubt it is possible due to the fact that it may be incremented long before the containers html is actually printed to output