Hello! Thank you for your suggestions!
@JorgeMaker Yes, I did, and it works flawlessly! Here, I have a video showing it.
@Valentine That’s what I thought at the beginning, but I switched to a brand new one and it’s still the same.
@David_Gonzalez The sensor signal seems to be fine. I’ve made a video where I have the motor disconnected, so I can freely move it, and the Hall effect sensor signal looks perfect.
I don’t really know what else I can try. It really seems like a firmware issue. My next step, I think, will be to switch to a different microcontroller, maybe an STM32, but I would really like to stick with the ESP32 because it’s really cheap, powerful, and there are no stock issues.