I have some follow up, in case anyone stumbles on this thread later. I swapped the IR #2 from a 1989 NA supra. It looked the same, worked great. Somehow it also seemed to resolve intermittently dead reading lights, or perhaps it was just wiggling wires that did that.
Now for the cause: THis car had aftermarket fiberglass bumpers that were bolted on, but the wheel well covering material was missing. The left quarterpanel was rusted through under the aftermarket bumper, leaving a 5 inch hole. Over a michigan winter water and mud and salt sprayed into that hole and left a pool of standing water in the trunk underneath the trunk floor where it was not visible. The green wire from the tail light relay was under water, as were all the wires in the same bundle, but the tail light relay had a splice as it splits to the various lights it powers, and that splice was right in the puddle. THe wire had rusted through. The tail light failure sensor looked water damaged, but turned out to be fine. The TSRM recommends testing the wiring to the taillight failure sensor to detect a bad board, rather than testing the part directly. This worked in this case: the wire from the tail light relay had no power and was floating (not grounded), but on the relay side, it was shorted (rusted) to ground. The tail light relay and fuse tested fine, but the IR #2 ( headlight retract relay ) appears to have been partially damaged, perhaps by the short circuit.
Since the IR#2 controls other systems also, and it coordinates this all through a single integrated circuit chip, I wonder if it could contribute to bizarre symptoms if part of that IC is malfunctioning.
I also wonder if any of the other postings about the taillight failure sensors going out are actually problems wiht IR2 or with damaged wiring?
BTW, if anyone should need to buy this part, I offered $20 for one of those IR#2 parts, untested, on Craigslist and got flamed for lowballing. Then I found it at the toyota slavage yard online for $25. List is $180. Dealer cost about $130 new.