Change quickly icons of a folder and its subfolders
This is a solution using the macOS GUI:


Copy your PNG image to your clipboard.
With Finder.app, open the folder whose folder and subfolder icons you want to change
Press CMD + F to start a search
In the Search menu bar click the folder's name. "This Mac" must not be selected.
enter kind:folder
In the results select all folders (CMD+A).
Press CMD+Shift+I to show the Inspector.
In the Inspector window select the blue folder icon in the upper left
Press CMD+V to paste your PNG image. All selected folder icons will update their icon.


Let me know if this works for you.

Sometimes you have to click twice on the icon in the Inspector window in order to paste the image successfully.