You can put objects in text fields so they flow with the text. (You also can put text fields in textfields). Just by copy pasting them in. That should be very useful in this context.
If your data is very repetitive (as in all pages look the same just with different title numbers and text but exact same layout) It should be possible to set this up as a "data-merge" from a CSV file.
There is also a "book feature" with which you could combine the data merged pages with other non-repeatable pages into one document. (At least I think you can't have other content in a data merge document – but never tried it just used it for business cards so far)
For boxes that would vary in width like the "head" box, you could use "Object > Text Frame Options > Auto-size"
If every page would have a different layout of boxes there may be options to do that but probably none that would be quicker than doing it manually unless you have 10'000s of pages. I'm thinking something like creating custom fonts with boxes that turn "--box_9--" into a box in combination with a GREP style that changes all strings that start and end with "--" to this custom font.