I have seen this a number of times on this engine. It is normally a MAP sensor issue but could be weak fuel pressure or even restricted exhaust.
What you are doing with pumping the gas is nothing more then opening the throttle, as the injectors are controlled by the PCM. If is running better then you have an imbalanced air/fuel ratio and as you open the throttle it is allowing more air in and then closing it, it lets less air in. So we need to know which way the ratio is imbalanced. Is it rich or lean? You can tell this by monitor o2 sensor data/voltage.
Here is a guide that covers the two major causes which are MAP sensor or fuel pressure:
https://www.2carpros.com/articles/engine-backfires-while-running
If you have a scan tool that can monitor the data can you tell us what the MAP is reading while this is happening and with the key off?
We then need to know what the fuel pressure is to find out if that is the cause. So let us know what the pressure is using this guide.
https://www.2carpros.com/articles/how-to-check-fuel-system-pressure-and-regulator
If the fuel pressure is okay, I would replace the MAP sensor just based on experience so I provided the info from the manual below.
Please let us know what you find on this. Thanks
Images (Click to make bigger)
Sunday, July 18th, 2021 AT 2:39 PM