I do that myself whenever I want to install a custom app for all users. It is definitely not the first thing to recommend. But if you cannot find an app in the repos or as a Flatpak/Snap/AppImage (or if you do not want to use those), then you have to build it or install it yourself. And there is no reason not to create and use an /opt/ folder for that, as long as you know and trust the source of your files.