Hello,
Yes, using PHP namespaces you need to add a use sentence or set the global namespace. For example, in the plugin, you can find the file NodeToDocxHandler.php, where phpdocx is used as:
$docx = new \Phpdocx\Create\CreateDocx();
$docx->embedHTML($html);
as you can check, it's using the global namespace to instantiate the main class: \Phpdocx\Create\CreateDocx . Or you can add a use sentence.
We also recommend you to check if you get any PHP error and if you need to get the raw value of the wordfragment tag in twig to avoid it's escaped.
Regards.