Some possibilities: Bad battery cables, bad ground bus, bad ground for PCM, bad ground for ICM, bad Crank Position Sensor, bad coil, bad Powertrain Control Module.
Often, the battery cables will corrode internally underneath the molded covers on the cable ends. The covers need to be cut or peeled back and the copper strands examined. Looking at the battery connection alone is not sufficient to rule this out as a problem.
Also, rule out the fuel pressure regulator by pulling off the vacuum line to the FPR and checking for gasoline immediately after shutting the engine off. If you see or smell gasoline, the FPR is leaking and needs replaced.