This article has a whole bunch of stuff to play with. I tried to find a script to do this, but haven't figured out the best keyword yet.
The closest thing so far in Kellys Korner, is the one that bumps up the bags to 8000. It also resets a couple of things.
Right-click the file in File Explorer, and select Merge at the top of the context menu.
At a guess, the first and second lines delete the current contents of the Bags. After it's applied, you can try "Apply to all folders" again while in the File Explorer thing.
My BagMRU Size is set to 5000, but I'm not an organized-folder guy either. I use filename_tagging to find stuff.
There is a limit to the size you can use for BagMRU Size, so don't set it to a million or something. MRU normally means Most Recently Used, so when the Bags fill up, the oldest folder setting is tossed and a new folder uses the slot. It's something like that.
Paul