Zetec engine? (Not sure as you're in CA)
Check the coil connector wiring. Sometimes it takes complete failure (wire(s) break completely) before it throws a P0351/P0352 code and the symptoms you describe - loss of power, inability to rev, no DTC codes, no overheating - were the same for me when mine failed. Also had a very strong gas smell and wet plugs.
Easy to inspect first by yourself - you're looking for cracks in the insulation, green corrosion or a complete wire break in either of the two outer wires of the three wire connector plug. Motorcraft WPT 517 is the part needed to fix it, if it proves faulty.
ECUs rarely go wrong. Hard brakes is the only symptom you've mentioned that seems out of place.