Final update:
As soon as I hooked up a benchtop oscilloscope to the sensor (kept heater two wires connected between car and sensor but tapped them for another scope channel), I saw that the pulse coming out of the sensor was perfect even before hooking up my sensor simulator.
And since these forums don't really have any members' interactions at all like a few years ago, I gave up and went to my local diagnostician. I explained everything I have done to him and in five minutes he gave me his conclusion that he charged me $80 for (an hour of work because he was either too mean or too honest). His diagnosis was that the brake booster needed to be replaced. He did not even replace it for me and told me that he could not get two it for two weeks (later called with an estimate of $380 in addition to the $80).

I kept driving the car and tried replacing the booster check valve grommet (the valve it self was fine, I checked it with a balloon) and it did not make a difference. I called around for an earlier day and found a guy who would do it for $200 labor but the dealer does not sell this part any more and other stores sell it for double the online price.

I started getting a consistent P0137 (sensor low voltage) in addition to the P0171 after I messed with the sensor connector and later I had to take a week off from work because the car started hesitating every time I hat the gas pedal and almost totally lose power at extreme uphill highways when transmission temp goes up to 240's.

The shop's appointment is on Thursday and it will be a gamble to drive it to them 40 miles away.