How replicate this step from Arduino IDE to PlatformIO

None. The only known hacks are to copy parts of the Arduino core into the project and massage it to work. (Heltec lora boards with cli on macOS M1 - #2 by maxgerhardt). Noone has done the work to properly integrate the divergent Heltec core / Arduino-ESP32 fork into PlatformIO.