Initial Wifi connection by sending file via USB + ESPtool or comparable?

We'd like to avoid using a Wireless Access Point code implementation for the initial Wifi setup.

  1. Is it possible to send a config text file containing SSID and WPA2/3 password via USB to an ESP32 (which previously has been flashed with the necessary binaries), so that on the next boot cycle it connects to the Wifi network specified in the aforementioned config file?

  2. Alternatively: What’s the most popular, most easy and leanest to implement Wireless Access Point configuration library?