On the ESP32, MicroPython runs as a single task under FreeRTOS. The motor control could be run in another, high-priority FreeRTOS task, and commanded from MicroPython.
I don’t know whether running it on the second ESP32 core would be a good thing.
There would be effort involved in porting the Arduino-specific library functions to the ESP-IDF API, and in making the outer loop into its own task.
However, since the ESP32 SimpleFOC code already uses the ESP-IDF libraries for (at least) PWM control, this may not be too difficult.