If anyone is interested, I solved the problem with a user-made script available here:
It allows me to “classify” files into folders (i.e. groups) by typing the name of the desired folder (or indeed writing the first few letters). Shortcuts can be defined for user convenience. So in the end it’s a step further from doing this manually in Finder, even though still miles away from auto-classifying and entire folder.
Needless to say, I find it very hard to understand why such a simple feature as name-based classification is not included in DevonThink AI (even as an option for certain filetypes for example).