Stock kernels simply do not provide the advanced features that we love. Smartphone vendors pack stable but bare solutions that give little room for customization and general improvement.
Luckily, XDA is a place where a lot of kernel developers share their work. One of them, XDA Recognized Developer flar2, has just published his ElementalX Kernel for the Moto Z and Moto G5 Plus. This kernel adds many interesting features including vibration control, Sweep2wake, Doubletap2wake, Sweep2sleep and more. You can also overclock and underclock your device with ease. Finally, the kernel does not modify the system partition, so the OTA updates should work flawlessly. Give it a try and say goodbye to your boring stock kernel!