Well, the mechanic who did the engine swap is no longer my mechanic, as I caught him in a few lies, including tampering with my instrument cluster to disable the check engine bulb because he couldn't figure out the problem causing it to illuminate. So, I don't take his word as gospel, and you're right, his statement doesn't make sense.
Your point on not trusting wiring from junkyard engines is well taken, and a hard lesson I've learned, although if I had to do this all over again, I would have just junked the car after the original engine blew, and used the money to buy a different car, but this mechanic assured me replacing an engine was a good move, as the car is otherwise mechanically good and has a solid body. I will never swap another engine in a computerized car with all sorts of emissions crap; I would only do it on a pre-1980 American car.
At any rate, I've spent too much on this car to give up now. Aside from the check engine light and idle issues, it runs and drives well, and by a miracle, passed emissions last month, so I don't have to clear that hurdle for two years.
Besides being invested financially, I'm invested emotionally, not wanting to cave in from a challenge. If nothing else, it will make me a better amateur Subaru mechanic.
Ken