I looked over the 1997 EWD FSM and many if not all of the symptoms described by beno (post #34) and others can be explained due to a intermittent connection between the two white wires running to terminal "B" on the alternator. Look at page 52 - Power Source - in the EWD manual. +12v runs from the main fusible link on the battery through a couple of splice junctions to the alternator, then from the alternator through another connector to several fuses on the fuse block in the passenger compartment. If there was a bad connection between the two wires at the lug on the alternator, power might not be reliably reaching the fuse block. This would affect the ECU, headlights (because there's no power to the headlight auto off "retainer" circuit), shift lock (because there's no power to the stop light switch), and dash illumination (because there's no power to the tail light relay). This theory is easy to test. Next time the headlights (and, by association, engine) fail, move the headlight switch to the "flash" position (pull the lever towards you). This bypasses the headlight retainer relay. If the headlights light up, then power is reaching the headlight relay but not the rest of the circuits "downstream" of that, which includes that part of the fuse block powered by the "main" fusible link. If this is the case, then there has to be a break between splice E7 in the engine compartment and the fuse block, and the most likely candidate is the inherent splice on the terminal lug at the alternator.