From what I understand you need the .phpenv file somewhere in the path of where you are calling the executable from so setting /root/.phpenv to 73 allows me to use php73 when called from /root, /root/cust etc. The magic for that is in /usr/clearos/bin/php.
Having said that, using the full path in the shebang should also work.
It is a pity that ClearOS injects /usr/clearos/bin into the PATH which defeats the normal "scl enable rh-php73 ...." command. You could try invoking:Then manipulate the path there to remove the /usr/clearos/bin from the PATH string and then see if it works running from there.
Beyond that, I have no idea.