You can add arbitrary folders to your Dock and these folders can contain other folders as well as aliases to apps in the /Applications folder.

1. Create a folder such as ~/Applications (macOS will automatically give the folder an icon if you use this location).
2. Add folders inside for the categories you wish.
3. Inside these folders, add aliases to the apps you wish.

   To create an alias, right-click on the app and choose Make Alias.

4. Add this folder to your Dock by dragging the folder from Finder to the right side of the Dock separator line.
5. Right-click on the folder in your Dock and choose:

   - Sort By: Name
   - Display As: Folder
   - View Content As: Grid

Editing the contents of this folder will automatically update the contents of the folder in the Dock, so you don't need to remove it and add it when you make changes.

<img src="https://i.sstatic.net/Je9PY.png" width="320">
<img src="https://i.sstatic.net/TKXYt.png" width="320">

To add a Recent Applications stack to your Dock, run the following in Terminal:

    defaults write com.apple.dock persistent-others -array-add \
      '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' && killall Dock

<img src="https://i.sstatic.net/9A8iE.png" width="253">

To perform other actions from this menu, create an Automator application to shut down and add it to your folder.

<img src="https://i.sstatic.net/UYtrQ.png" width="586">

**[EDIT]**

You can also use the same process to create an Automator application to put your Mac to sleep. Follow the same process but replace `shutdown` in the code with `sleep` so that it'll be:

`tell application "System Events"
		sleep
	end tell`