Because the MAF is located between the airbox (fixed to the chassis) and the engine (somewhat-movable), the MAF wires always need to flex slightly at some point. It's very common to see breaks develop over time in the loop of wire connecting the MAF to the main bundle of the engine harness. Your assumption that the car should still start with a bad MAF signal isn't usually true, I've seen plenty of Nissans towed in on a hook for a piece of lint or butterfly wing in the wrong place. Most Nissan ECM's don't have any effective cross-check for the MAF, they just need to trust it. When it lies, bad things happen. On older stuff the car will usually run without the MAF only if the MAF is disconnected. Try unhooking it and see if it runs better, if so then it's definitely causing your issue.
I'd start by doing some earnest diagnosis on the MAF instead of throwing parts at the car. You should see a solid 12V across the two middle pins of the MAF connector, if it's low or zero then you have a wiring problem. To find out which wire, test each of the middle pins to a chassis or battery ground. If both are still zero or low then the problem is on the power side, if one of them suddenly reads 12V then there's a problem with the ground wire. The colors on your new connector probably won't match, but you can find a diagram on EC-105 here. The connector view shown is "terminal side", i.e., the side away from the wires:
https://www.nicoclub.com/service-manual ... 7%2Fec.pdf
Bad pin-fits and poor grounds are also common problems on any older ride. Bad grounds are a particular issue on any old car like your Altima where the ECM is inside the car and not in the engine box. Here's the right way to check them:
keep-your-engine-on-the-ground-not-just ... 28130.html