Use Guetzli or MozJPEG for JPG processing

How can I configure Hugo to use Guetzli or MozJPEG for JPG processing? I want to recompress all JPGs using any of those libraries.

You cannot. The Hugo binary comes packaged with a Go library for image processing:

If you absolutely need to use the libraries you mention, then you will have to process your project’s images outside Hugo.