How to archive/get a list of a user's files when using object storage?

We’re currently using owncloud with traditional storage. I’m evaluating and testing migrating to using nextcloud with S3 as primary storage.

At the moment, when someone leaves the company, a script runs which collects any files under that user’s directory into a tar file which is then archived on S3 for a year.

When nextcloud is configured to use S3 as primary storage, that process won’t work without alteration because (a) there aren’t any user directories on S3 and (b) the files don’t have filenames.

It occurs to me that since the tarball gets stored on S3 currently, an option would be to create a new local user, transfer ownership of the files from the departing user to the new user and then, after a year, delete that new user which would then result in the files getting deleted. However, for that to work, I need to get a list of all of the files owned by the leaving person so that their manager can decide whether or not any of those files need to be retained.

I thought that files:scan might help me get a list of the files but it doesn’t do anything, presumably because there is nothing to “scan” when the files are stored on S3.

Does anyone know of a mechanism or existing tool I can use to retrieve a list of files owned by a given username?