In docx4j, JAXB objects represent the XML. So, a given w:p has a w:pPr object you use for formatting; same for w:r (it w:rPr). To alter the document, you manipulate the JAXB objects.
Suppose you have <w:r><w:t>The cat sat on the mat</w:t></w:r> and you want to make the word "cat" bold. In this case you'd have to split the sentence into three runs (the second containing "cat"), in order to embolden just that.
It would be possible to implement a https://en.wikipedia.org/wiki/Piece_table
but then you'd have to route all changes through that to keep it up to date (or re-build it whenever you've made a change which bypasses it).
There hasn't been much demand for range from docx4j users over the last 10 years, but it would be interesting to have!
You might share more about your use case? (I guess converting VBA code is one, and building an editor around docx4j is another...)