Managed to create a script which is executed on a folder level. Basically, the script takes the custom properties of the selected folder and updates all the child objects with the property values.
Currently the use is obliged to use the Run Action DocLib action and select the right JS file. I would like to simplify this to create a DocLib action displayed in folder-details and folder-browe views.
Added the following code to the share-config-custom.xml