a pretty much general question, but in our instance, we would greatly benefit from a way to connect a Nextcloud instance to a Write Once, Read Many archive system.
The downside is, of course, the needed storage space will only grow as years pass.
The rationale is that we had some malicious actors who deleted important files before leaving, and that would be great if an in-movable archive could be created, more easily than a stack of DVD+Rs.
How would that be possible in Nextcloud¿
I think you have to differentiate here between the private data of the users and the company data. You will only be able to implement your requirement for the company data e.g. Group folders. if you search in the data of former users, you have real problems.
Even if you can perhaps integrate external storage within Nextcloud, for example, which has certain functions, I would look for the solution in the backup (not Nextcloud) itself. You can minimize the amount of data by making incremental backups of company data. In addition, users should not have access to the backups. Of course, you can also use WORM media for the backups. Of course, you can also outsource the creation and storage of backups to a service provider or the cloud.