Discussion posts and replies are publicly visible
If you want to delete all files in a folder, the plugin "Content Tools" has a smart service to do that. This plugin also has a smart service to delete multiple documents in one go.
For modelling loops in a process, find some examples in the documentation: https://docs.appian.com/suite/help/23.3/looping.html
You will have to implement some kind of batching. Do not try to load all IDs into memory.
Your approach 1 is probably a bit more efficient.
Thank You Stefan