That last part scared me! I tend to have ADB debug over USB always enabled on my phone but I'm not in any way enabling debug over wifi now I know this.
To allow untrusted access, you'd have to have the ADB port accessible to the attacker, and then intentionally open developer options and tap "pair for wifi debugging", and then enter/scan a malicious pairing code, and then accept the unrecognized public key when the device connected. And if that does happen, there's a persistent notification that a debugger is connected.