Can't add ESPhome integration

“Bad power supply” could also mean the 3.3v LDO (low drop-out) voltage regulator on the board. Or bad filter caps. The cheap Chinese clones are notorious for this. See this topic for some recommendations of good boards: What's your favourite ESP32 board? (# Best, good, cheap, quality, reliable)

As long as you have the board definition correct it does not matter if you use 21 or GPIO21.