Maybe this is will do what you want:
- Click on finder, "New Smart Folder".
- Click on "+", select "Kind" is "Folder".
- Click on "+" again, fill in 0 for days.
- Click on "Save", name the smart folder "Recent Folders" and add to sidebar.
Now whenever you open a folder "Recent Folders" is shown in the sidebar.
You can even drag "Recent Folders" from the sidebar to your dock and set it in options as to "List" "Folder". Then when you click on it in the dock it will show you the recent folders.