The DataCite OAI-PMH endpoint supports harvesting sets made from arbitrary queries: https://support.datacite.org/docs/datacite-oai-pmh#arbitrary-queries. That would be an interesting feature, that would also prevent having to create new sets on demand when requested from users.
Some considerations:
When harvesting an arbitrary-query set, only "formal" sets will of course be listed for each entry
There should some "complexity" check for the queries or possibly a rate-limiting mechanism preventing users to abuse the system with very heavy queries.
The DataCite OAI-PMH endpoint supports harvesting sets made from arbitrary queries: https://support.datacite.org/docs/datacite-oai-pmh#arbitrary-queries. That would be an interesting feature, that would also prevent having to create new sets on demand when requested from users.
Some considerations: