Custom build of esp32 over idf-release/v5.1

There is now also a pull request up with a patch (thanks @jason2866 for the help) to allow just setup of frameworkarduinoespressif32-libs, i.e. that will fix the KeyError. Support Arduino ESP32 alpha v3.0.0 based on ESP-IDF v5.1 by sgryphon · Pull Request #1281 · platformio/platform-espressif32 · GitHub but otherwise uses standard PlatformIO (no other customisations).

However, there are a bunch of breaking changes in alpha 3.0.0, so your code might not even compile with the new package … but this will at least allow you to get to that step.