Badly. Nextcloud is a very active project with many plugins and integrations. You can even integrate a mail system and AI image tagging, chat and video calls.
Owncloud focussed more on the enterprise sector and less on fancy features. Definitely the more stable product (but not only in the positive sense).
I would say that “on prem” defines a location, “selfhosting” an action. You can do both at the same time, e.g. selfhosting nextcloud onprem.