Alternate method to flash sketch UNO R4 WiFi?

I'm looking for a way to flash the UNO R4 WiFi without using the onboard USB port or another Arduino.

Is it possible to flash the RA4M1 with a sketch using a USB CH341A adapter? The adapter I have does SPI, UART and I2C. I've read elsewhere that the default Arduino bootloaders support flashing over UART or SPI but I can't find any such documentation for the R4 WiFi.

I've tried using the following setup, and got an empty chip while trying to read. (I have no idea if this is the expected result). I have also tried using UART but I don't know where to wire the reset.

CH341A | UNO R4 WiFi
CIPO | 12(CIPO)
COPI | 11(COPI)
SCK | 13(SCK)
CS | RESET
GND | GND
VCC | VIN

Is it possible to use the ESP header to use the ESP32 to flash the RA4M1, given that the ESP exposes a UART(?) connection through those header pins?

the SPI pins on Uno R4 are not ICSP pins as on classic ATMega MCU.

the USB connector is handled by the esp32s2. the esp32c2 is the USB-to-TTL-Serial adapter on Uno R4. in this configuration the RX and TX pins of the esp32s2 are its Serial1.

the firmware in the esp32s2 is an Arduino sketch: https://github.com/arduino/uno-r4-wifi-usb-bridge

the Arduino bootloader on the RA4M1 listens on its USB on both Uno R4 Minima and WiFi and on Uno R4 WiFi it listens on Serial too. Serial is wired to the esp32s2. On Uno R4 the USB connector can be switched to RA4M1.

the RA4M1 has DFU mode (a USB and Serial bootloader in ROM)

Do the pins on the ICSP allow me to program like on the other ATMega chips?

I'm aware the usb connector is handled by the esp32s2. I've soldered the pad for the RA4M1 and am looking for a way to upload a sketch to it with the ESP32 bypassed. Bypassing it via pin 21 high to switch the mux doesnt work for me because the ESP32 sends its USB descriptors as the other processor is booting, resulting in the ESPs descriptors being visible. I've tried modifying the ESP firmware to delay initializing the USB to prevent the ESP32 from sending its own descriptors but that created other issues.

DFU-RT port shows up as drivers not installed. Unsure what to do with that. Does the default bootloader on these boards not accept flashing over UART/SPI on boot?

no flashing over SPI
maybe read my comment again and slow

My bad, I thought you were referring to the pins 10-13 as the SPI pins and forgot that the ICSP header pins are SPI.

My options for updating the sketch without USB are then limited to forking the bootloader and adding in some UART over TX/RX pins, or to use ArduinoOTA?

The Arduino bootoiader listens on Serial so it should be possible to switch it to Serial1

or modify the firmware sketch of the esp32s2 so it reads from its Serial1