Hello,
Your solution is correct to work with concurrency conversions: using a not unique home folder but random ones in an existing folder. An alternative solution would be using a custom UserInstallation parameter with a random folder when doing the conversion in the tmp path (or other path):
$docx->transformDocument('document.docx', 'output.pdf', 'libreoffice', array('extraOptions' => '"-env:UserInstallation=file:///tmp/temp_lo_{randomid}"'));
replacing {randomid} with a random value (the extraOptions option is available since phpdocx 11).
On the documentation page available on https://www.phpdocx.com/documentation/conversion-plugin/common-problems-and-possible-errors you can find information about doing concurrency conversions with the conversion plugin based on LibreOffice.
Regards.