One of the smart things with zsh is that the hooks¹ like precmd can be replaced with arrays of functions, so that you can cleanly have multiple hooks per hook point. It even provides a nice tool to work with the the arrays too², which makes editing/enabling/disabling far easier.
It makes life far easier when you see people post useful snippets(like wolfgang42's), but don't want to have to mangle them in to your already messy monolithic function.
¹ https://zsh.sourceforge.io/Doc/Release/Functions.html#Hook-F...
² https://zsh.sourceforge.io/Doc/Release/User-Contributions.ht...