My ford mustang dies each year?

I have a 2005 ford mustang… I have a red top battery in my car. Each year i start having this problem where my car starts shutting off for no reason while i'm driving it… It shakes a bit then turns off… I see my rpm going up and down from 0.5-1.5 randomly. I keep replacing the battery and my fuel pumps recently i had my transmission replaced also. Just had the battery and alternator checked and right as the mechanic was telling me that everything was good with them both, the car shuts off… Sometimes it fires right back on and other times i have to wait a few hours… I notice it cuts off when i turn/ or brake when driving… Sometimes it turns off just if i have the car running. I have no idea where else to start. I have had my connectors replaced on the battery cables… Replace battery, changed both fuel pumps and just had transmission done… Help
also i notice that if i'm on a slope i have to floor the gas to get the car to move…

Fuel injectors?

Intermittent problems are a pain to fix - I suggest taking it to another mechanic for a second opinion.

Why do you keep replacing the battery when obviously that is not the problem? A new propriety battery should last at least 3 years under normal usage, you need to check your charging system if the battery keeps going flat.
Your problems sounds more like something to do with the electronic management system if it keeps shutting down into safe mode, or possible a fuel problem.

I had similar problems with my car. When I went underneath the hood, I saw my air intake manifold was not connected properly. I would check that, if it is on tight and correctly, instead of looking for mechanical issues, look for air circulation issues. If the car can't "breath" it won't perform correctly