Eth and WiFi cohabitance

I want to connect a hardware Eth module to an ESP32 as here.

In my design, I have Eth pins connected to ADC2 of the ESP32, which are known to be unusable while WiFi is being used.

Is it possible to sense when an Eth cable is connected, then disable WiFi - while still using the Eth functionality?

Most (all?) PHYs have a way to check for link state.
lwIP certainly can initialize interfaces and set default “routing”
On the specifics of doing it at the Mongoose-OS level I can’t tell, but the underlying layers support that.
There’s some guy here that already did that, search the posts, we exchanged some comments on routing and default interfaces, that could help.