Help me save my Jetta from junkyard

2002 2.0L AVH engine 127k ish miles.

Quick history; was my brothers. Last year he overheated it and blew head gasket. I replaced head gasket and the following was done; head to machine shop & they did valves, new water pump, new OEM coil pack, plug wires, timing belt, cleaned intake manifold and throttle body. Mobile 1 oil and filter. Car ran great.

About 3 months later. the new water pump failed and my brother sold me car for 500 bucks. Fixed pump and car ran great.

A few months ago. car started misfiring after it idled for hour and half. OBD scanner showed P 0300, 0301 and sometimes p0351. I checked compression, swapped fuel injectors, spark plug wires had resistance within specs. I put vacuum tester on and at idle the needle jumps up and down at 2k rpm needle steadies out. Misfire is less noticeable but is still there. I taped up the tubing from air intake to secondary air pump and from air pump to valve on back of engine (I think it’s the EGR? Could be wrong) no change. *

Yesterday I replaced the spark plug wire to cyl 1 as there was a crack on boot that connects to coil pack. And I got the NGK Laser platinum plugs from the dealer. The mechanic suggested there is a short in the wiring for the coil pack. I cleaned and tested as well as I could.*

I had 2 episodes lasting about 30 seconds of the car running perfectly! I heard a loud hissing noise but no misfire. The tubing that connects from the engine to the inner hole on the secondary air pump had come undone a bit. When I reconnected it, the car misfires and stalls, BUT when I undo it, there is no change. The next time it worked itself off a bit, the car again ran fine. *

Please help me figure it out before the junkyard comes to tow it! It has been sitting in my mom’s yard all summer and she is sick of it but I really do like the car.*

What were the actual engine compression readings in psi?

Regardless of the jumping vacuum gauge readings, about what do you have in terms of inHg at idle? (And what is your approx. altitude?) How much of a jump up and down is there? When it steadies out at 2K rpm what does it read? The jumping can come from misfire alone - or it can come from valve problems. Is it a very regular movement or more irregular? Is it quick and twitchy or does it more like float? How well do you trust the shop that did the head?

Check the fuel pressure.

Given the P0351 is this a coil on plug system? In which case you’re not swapping around plug wires, exactly but COPs? At some point you will have to wonder whether the PCM driver circuit has an issue. But given the occasional P0300 (as opposed to only a P0301) you very well might have more than one problem.

~ Edit: I am somewhat astounded that this post was edited and not by me. So do me a favor - don’t edit my damn posts. If you don’t like something then first, lighten the hell up. And then second, if you really won’t lighten up then just delete the whole thing. Fuming.

Troubleshooting with a vacuum gauge.

What I’d like to know are the actual compression number readings. This will at least give a general idea about how deep to get into this car.

I’m in agreement with cigroller there may well be more than one problem here.