Actually, it's already been done by the former Nextcloud fork/predecessor. OwnCloud shared a big percentage of the Nextcloud codebase, but they decided to rewrite everything under the name OCIS (OwnCloud Infinite Scale) a couple of years ago. Recently, OwnCloud got acquired by Kiteworks and it seemed like they got in a fight with most of the staff. So big parts of the team left to start "OpenCloud", which is a fork of OCIS and is now a great competitor to Nextcloud. It's much more stable and uses less resources, but it also does a lot less than Nextcloud (namely only File sharing so far. No Apps, no Groupware.)
OCIS does only a small part of why people deploy NextCloud. I have run it, it’s great, but it’s not a replacement for the full suite nor is it trying to be.
I have OpenCloud working on my home server, and it features integration with the Collabora suite of software for office apps. Draw.io is also already supported.
Thanks for sharing this, I've been wanting to look at private cloud stuff but it was all written in PHP. It looks like OpenCloud is majority Go with some php and gherkin, which is a step in the right direction.