As @Derek Gusoff mentioned, doing such a large bulk operation is tricky and will likely run into throttling issues, and while I would agree with the comment to push back on the idea of doing it all at once, you can still do something towards reaching the requirement.
You could set up a flow like this:
- Trigger on item updated
- If the item is a file:
- Find the parent folder and set the
CustomerFilesLastModified
field - (It isn't clear from your question if you only need to set the field on the immediate parent subfolder, but you could also have the flow continue to climb up the folder hierarchy, setting the field on each parent folder, until you reach the first level of the original 3000 customer folders, if that is your requirement)
While this wouldn't have all folders immediately populated with the correct data, it would allow for the data to build up over time without any intense resource usage or heavy bulk operations.
This is a step in the right direction, and probably what you want as a long term solution anyway. If you still have a requirement to get the data populated on all folders ASAP, you at least have something working for you making incremental progress while you take the time to fugurefigure out how to do the bulk operation.