This is a hard problem. Solvable only with try and error.
Those signals are just weird mess of coils, switches and resistors.
ESP32 clock speed may also be a contributing factor.