You could create an AppleScript to minimise all windows and then pin it in your dock. An example of a script that minimises all windows can be found herehere:
- Create a new Automator application that executes an AppleScript
Export this to save it as an app somewhere (File > Export)
Add the exported application to your dock
The first time the application runs, it will request the ability to control your computer, you need to allow it so that it can minimise apps.
You can optionally set a nice icon for this application, by selecting it and pressing cmd
+i
to open the info window and then pasting your custom icon over the current icon: