Going back to the capacitor. I have a ESP32 CAM taking frequent pics for the last year. I had trouble with getting decent power to the ESP32CAM. Along with taking pics I used WiFi to FTP the images from the cam. WiFi use would, from time to time cause various power issues.
I used 2, 2.7V 1F capacitors wired in series across the 5V line. Solved my issue.