Hi,
You can add a boolean in User Setup page to restrict the user to delete the companies.
and based on that boolean field use a event subscriber and call onbeforedelete event on the page "Companies"


Also, in order to have access or visibility of boolean field in user setup page you can hardcode the user value which should have the access of boolean field edit or you need to remove the permission of modifying the user setup data from the users.
If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.