The first idea that came to me, is to add a technical field on account (flag, default = false).
Extend your CSV with the new flag, set for all = true
Extract contacts with condition where Account.MyFlag__c = true
Delete flag (since not more useful)
When you upload Files there is "PathOnClient" field I think, you specify it and DataLoader will use it as a location for a file. You upload those files as ContentVersion and then to link them with the account you separately upload ContentDocumentLink records. Keep in mind that you can upload ~100k Files a day
P.S. after you upload files result "success" ...