The Model M uses 5V logic level and the ESP32 uses 3.3V, so converter circuitry would be needed.
There is Bluetooth HID firmware out there for the ESP32, but you would probably have to port TMK's terminal protocol code to the ESP32.
I think it would be easier and probably cheaper to just get a $5 Pro Micro and flash it with TMK's or Soarer's converter firmware.