To get docx4j working in any of these environments, you do 2 things in your project.
First, use maven to add docx4j-JAXB-ReferenceImpl as a dependency
Second, create src/main/webapp/WEB-INF/jboss-deployment-structure.xml containing
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.sun.xml.bind" />
</dependencies>
</deployment>
</jboss-deployment-structure>
See further https://access.redhat.com/solutions/4284651
We have tested/confirmed this config on EAP 7.2.9, 7.3, 7.3.3 and WildFly 20.0.1
There is no need to make any system-wide config change.