Autocompress low use folders

Hello there, I have 20tb of storage on my selfhosted nextcloud and I am already using 15tb of it. I can add more drives and thinly provision them for more space, but I was wondering about an option that would make it faster: automatic compression.

I would like to be able to set an automated flow to grab folders where nothing in the folder has been opened in x amount of time, it will compress the folder. individual files might be good as well, but folders with a large dictionary are better.
it would be nice if this automatically started compressing when the server has minimal usage (ie: at night, when I am asleep) and just kept trying different compression methods in the background (ie: compare lzma vs zstd) until it gets the files as small as possible.

this would basically make the duplicate files I have in various folders disappear from use, which admittedly, most are smaller docs, so not much to be saved, but it may still help slow me down from reaching my 20tb.

Several filesystem types (at the OS level) already support compression (and deduplication). Probably no reason for that to be reinvented within Nextcloud itself.