Good friend had a similar problem on his Peterbilt Truck; the low coolant sensor on the radiator had the "lock" on the nearby wiring plug break. This allowed the male/female parts of the plug to partially separate, sending a stop engine signal to the computer. Looking at the plug, it appeared to be OK, but whenever he closed the hood, the engine would stop. Open the hood, he could start up, no problem, closing the hood would put just enough tension on the wire harness to separate the plug. After hours of frustrated troubleshooting, he called another old trucker who had "been there, done that". He sent Mr. Frustration to nearby store for a six-pack, then showed me the problem, secureing the plug with a few wraps of electrical tape.
Experience can be a pretty good teacher!!!!!!