battery is a year old and the problem came on all at once so it sounds electrical to me. All the grounds are good and I went through the vacuum lines as well, there are no leaks.
I have had a gascap fault for some time that I didn’t pay much attention to because it was just a gascap — it’s gone now. What put me on the computer is that it is choking out AND has a random misfire AND has codes that don’t make sense (Knock sensor, evap, etc)
On modern, fuel-injected vehicles, a loose gas cap can cause problems. Has something to due with pressure in the fuel tank and the evaporation control system (a tank that basically absorbs fuel vapor from the system to prevent it from leaking into the atmosphere). The loose cap prevents the evap system from operating correctly and sends a code. It can also cause the engine to run funny.