So was just out messing with it. I pounded, pulled and twisted on pretty much anything under the hood I could get at. It never missed a beat. I pulled one of the PCM connectors off and noticed something I've never seen before. There's some kind of oil in here. To me that's not normal.
Smell it- Is it engine oil? Is it as runny as it looks in the pics or is it like an epoxy that might be melting at higher temps?
Maybe the oil pressure sensor is leaking and the pressure is pushing oil through the wiring like a tiny pipeline and dumping it inside the connector. Try a tiny catch can on the sensor's wires? Since the oil pressure and knock sensors are located in close proximity, maybe their wires are close to each other in the PCM plug and the oil dripped out of the oil pressure wire and hit the knock sensor wires below them?
Still, the knock sensor circuit might not be what's shutting off the engine. Could be the PCM killing it from what it thinks is low oil pressure from the intermittently failing oil pressure sensor. It may be cracked or just leaking and you have two problems.