We faced similar OutOfMemory issue when working with the document attached. The walkJAXBElements method of the traversal util never went pass the getChildren stage.
We ended up brute forcing it, specifying -Xmx16g when launching the JVM.
Jason, given we process lots of documents in a pipeline and are willing to skip the occasional outliners that will spike memory usage, we are thinking about writing another traversal util that check if(Thread.interrupted()) from time to time. That way we can do futureTask.cancel(true) whenever there is a time out. Otherwise Docx4j's logic is uninterruptedly blocking.
Will post code here or issue a pull request if you think that can be helpful
In addition, you mentioned "just displaying docx document in a web browser" without the need for editing. We currently do (i) https://github.com/yeokm1/docs-to-pdf-converter
plus (ii) https://github.com/mozilla/pdf.js/
Is there a better way using Docx4j?