```sh
defaults write com.apple.Dock autohide-delay -float 5 && killall Dock
```
This will cause the Dock to remain hidden until you hover your cursor at the edge of the screen for a full 5 seconds. You can change the number of seconds to anything you wish.
To restore default functionality:
```sh
defaults delete com.apple.Dock autohide-delay
```
see: <https://www.quora.com/How-can-I-completely-hide-or-remove-the-Dock-in-Mac-OS-X-Yosemite>