I think this is the really interesting point: You must not use Nextcloud On-Prem. It must not be cheap. But you can change your Nextcloud hoster or change to On-Prem every day.
An independent Nextcloud consists of your own domain or subdomain (e.g. CNAME cloud.server.tld), the free Nextcloud software, the Nextcloud configuration and the Nextcloud database. This allows the Nextcloud to be relocated at any time to any place. Ask Microsoft whether this is also possible with Microsoft 365.