If you can Query the right data from those tables and build the dataset, DMT will allow you to remove them in bulk. (I’d add xfilerefnum and doctypeid to the required fields list.)
We are still on-prem but when we implemented ECM I wrote some migration scripts that extracted the documents form the file store, then re-imported into ECM and then lastly used DMT to purge the old documents.
Using the BO’s to do this meant that the old file store got cleared out at the same time. I guess if you are not interested in retaining old documents then as previously suggested you can just use DMT and then delete the file store afterwards.