It sounds like you may have a bad ground wire. Follow the large black wire from the battery to the chassis. You may need to replace it. There is also a ground wire that comes off of the starter (located underneath on the passengers side). Check this wire as you may need to replace it too. Pull all the connections of the starter and clean them. Spray all connections with terminal protector.
With grounds in mind, check all over the engine bay for any wires bolted to the chassis. Those are all grounds and need to be free of corrosion and making a clean contact with the chassis. My wife's Taurus was having some weird electrical issues; engine would cut out at random, sometimes wouldn't turn over then would be fine for a week. I went over everything with a fine tooth comb and ended up finding that the bolt connecting a ground braid to the engine block was covered in corrosion. I cleaned it up with some battery terminal cleaner until the metal was shining again, tightened everything back up and the car has been running issue free ever since.
Worst case scenario though is that the car's ECU may be going bad. If something shorted out the computer may be fried at which point it would have to be replaced.