I don’t think its a good idea to use exactly the same fqdn, you should check against nextcloud’s requirements.
I am using OwnCloud, from which Nextcloud was forked. And I use a different fqdn, like “mail.domain.com” for mailcow and “cloud.domain.com” for Owncloud.
It can run under the same IP though if you have a reverse proxy. However I would not recomment to run it on the same host as mailcow, because that does a lot to the docker iptable rules, and port bindings could get difficult.