In my opinion document templates are an outdated feature of the Mendix platform. They tend to give issues with CSS styling. You might want to consider saving yourself a lot of time and use a 3rd party solution.
https://docs.mendix.com/refguide/how-to-create-your-own-documents#5-alternative-ways-of-creating-documents-a-name-alternative-a
I ran into the same issue and unfortunately word wrap does not fix the issue or any other css solution. The only thing that worked for me was to insert zero width spaces into the string.
Credits to this post:
Hi satyanarayana.palepu,
try using is code,
text-indent: 5em;
in the label custom Style.
also take a look at this.
https://forum.mendix.com/link/ideas/1097