The Search Replace Transfer plugin will transfer the name of the innermost containing folder to keywords, but I don't think it will do outer containing folders.
You could use the LR/Transporter plugin to export a list of your cataloged files along with their folder name and path into a CSV file. Then you could import the CSV file and manually or with Excel scripting add additional columns for each level of containing folders. Then you could use LR/Transporter to read that modified CSV file and add the contents of those columns to the corresponding files' keywords.
If you're facile with Windows or Mac command-line scripting, you could write a shell script that uses the free Exiftool to add each containing folder as a keyword to each of the photos. In LR, you'd first do Metadata > Save Metadata To File to ensure the metadata in the catalog is written to the files, then run the script, then do Metadata > Read Metadata From File to cause LR to reach the changes made by the script.
You could use the free Lightroom SDK to write a plugin to do what you want. But that requires strong programming skills and even so, has a steep learning curve -- if you're a strong programmer, figure 4 to 6 hours at least (assuming you don't know Lua).
Thanks for your reply. Very helpful.
I don't really code at all, but I'm sure with a bit of time I can crack it to do what I want. How hard can it be ? Famous last words...
Thanks for this. I'll have a read of it