Stalling out when going downhill

I have a manual transmission in my 2002 Subaru. For the last year, the car occasionally stalls out when going downhill (in particular, at slow speeds). Sometimes the car doesn’t stall, but the check engine light appears. I had the idle control engine replaced; no change. I’m driving to CO (2,000+ miles in four weeks. Can anyone offer advice before I take the car in again? I’ve wasted a lot of money and can’t get the problem fixed.