How do I troubleshoot low touchscreen event rate? I have a strange slowdown on my device (non-rooted Android 5.0.2). At times, the screen becomes unresponsive. And touchscreen testing apps register only a few events per second when I move my finger over a screen, as opposed to dozens.

Sometimes it gets back to normal. I manage to make it normal with appkillers and/or service disablers, but it's a) not reliable b) random actions instead of  searching for the root cause.

So the question is: how do I trace down the issue? I'm a programmer so I'm able to use tools if necessary.

GNU/Linux tools and general troubleshooting (identifying and killing offending processes) don't work well in intent-oriented architecture of Android, so some android-specific tools are necessary, such as Android Profiler.
Try one of the apps that will let you run a terminal window and run the top command -- that will show you the processes using the most CPU.  I use "Terminal Emulator for Android" -- it is easy to install and use.