You need to rule out two things first: Vacuum leak and spark.
Get a spare spark plug and test for spark at each wire.
Vacuum leak sounds very plausible. A can of carb spray/cleaner sprayed all around the intake/engine bay will show a vacuum leak in less than 8 seconds. Give it a whirl. These engines will not start and will exhibit the issues you're experiencing with a vacuum leak.
I am thinking it could be a failure of MAF sensors.
MAF sensors aren't expensive and don't fail often enough to warrant buying new, so get a used one.
Do you use a K&N filter or other oil impregnated air filter? The oil can foul up the MAF which a cleaning will fix. Not likely since yours was such a dramatic failure, but worth a shot. Auto parts stores sell MAF specific cans of cleaner. Brake cleaner would likely be a good shot too.
MAF sensors have a visible failure sign too. I haven't checked out the new gen sensors since i've never seen one fail, but the older ones can be checked and I wouldn't be surprised if the new ones can as well. If you look inside of them (from the ends) you can see the hair thin wires going through the inside of the air flow. They are very fine so you'll need good lighting to see. If one strand is broke, this will cause the symptoms you're experiencing and tells you for sure the MAF is bad.
MAF sensors can also fail internally and show no visible signs. The FSM may have spec's on how to test yours, I can't recall.
Personally I wouldn't spend tons of time diagnosing the ECU and AT until I checked/replaced the MAF with a used one.
15 Million Students Helped!
Sign up to view the full answer