MariaDB or Postgresql

No. I have a HA setup already, using Galea cluster. Better support for HA is just one of the baked in pros of Postgresql. It is not the point of my comments.

Nextcloud is both an open source community driven project, driven mainly forward by the single largest contributor: Nextcloud GmbH, which makes a Living from enterprise customers. Then there is also all the app developers.

Nextcloud core is driven then by developers getting paid to serve enterprise customers, hence stability, security, enterprise enablement, HA and so on, is what drives this.
As such Nextcloud is enterprise grade Open Source software. It makes sense to then make a decision as to which primary database engine is the renommeded based on an enterprise grade perspective. Here Postgresql just comes out on top on so many parameters.