Yes, this approach should work and looks fine. Depending on which package you actually want to install automatically on a set of hosts, this may be a litte tricky, though. If the package is part of the app itself, remote hosts do not have access to this package in general. The repository is only available on the host itself (unless to activate the app repository on all of these hosts).
Adding the policy and the reference to some (or all) UCS servers in the domain can be done in the join script. Please also think of the possibility that the app is uninstalled. In this case you would need to remove the policy and maybe somehow clean up the installation on the remote hosts. This would require an unjoin script. Please have a look at docs.univention.de/app-tutorial- ... ation:join.
An alternative approach could be to require these hosts to install an app that has these packages as "DefaultPackages" defined in its ini file?