Example for working with a rotary encoder?

You are right.
I don’t see a reason why this wouldn’t be implemented for ESP32, maybe worth opening an issue on micropython upstream repo.

This really sounds useful, and it will probably be added soon to micropython.
See this forum thread.

Another option is using the espidf module, which provides raw esp-idf micropython API.
I’m using it today to access SPI and I2S directly from micropython. (see for example the micropython ili9341 driver).

I’ve added pcnt support to espidf module (it really only required adding a single line!), so you can simply do something like:

import espidf as esp
esp.pcnt_unit_config({
  # ...configure pcnt here...
})
...
cnt_ptr = esp.C_Pointer()
esp.pcnt_get_counter_value(esp.PCNT_UNIT._1, cnt_ptr)
print(cnt_ptr.short_val)