I believe that the ESP_IDF behavior can be replicated with pio Advanced Scripting. Will describe my journey in this post.