Deleted opt/ folder with file librh-php72-php7.so

Sorry. I am not a RHEL or CentOS user.

Here you can see the files are in package “rh-php72” (scroll to Files):

https://centos.pkgs.org/7/centos-sclo-rh-testing-x86_64/rh-php72-php-7.2.10-3.el7.x86_64.rpm.html

Perhaps you can reinstall the packages (read https://doc.owncloud.com/server/admin_manual/maintenance/upgrading/upgrade_php.html#upgrade-php-to-version-7-2 ) or unzip/decompress the rpm-file and manually copy them back to /opt/… Sorry i am also not a rpm-expert.