first of all, the warnings about Collabora and Horde are not the cause of the failure. They are just warnings. Which locale do you use? Is it one of en_US or de_DE?
Anyway, the problem is:
E: object not found
There are several ways to “fix” that. The script does the following on that line:
univention-directory-manager container/cn remove "$@" \
--dn "cn=nextcloud,cn=custom attributes,cn=univention,$ldap_base" || die
Therefore you could simply add the container (which apparently was already removed from a previous attempt?):
# this only works on your Master system. On other systems, you would need to pass credentials
udm container/cn create --set name=nextcloud --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)"
Then the script should run though. There is one more line that could fail:
su -c "psql -c \"drop database nextcloud\"" - postgres && \
su -c "dropuser \"nextcloud\"" - postgres && \
rm /etc/postgresql-nextcloud.secret || die
If this fails, too. We will have to look into the postgres database.