Couple of things to check.
There is a box halfway up (or down) the speedometer drive, this feeds a signal to the ecu to tell it the car is moving. under normal circumstances, as you come to a halt, you take your foot off the accelerator, the ecu knows the car is still moving, and keeps the fueling up a bit, and then when you come to a halt the ecu gracefully drops the revs allowing the engine to come to idle. If the ecu loses the knowledge that the car is moving it doesn't drop to idle in a graceful manner and could stall. Going downhill is an issue because your foot is off the gas pedal and the ecu will have reduced fueling, and the engine is still turning (engine braking) so the ecu may drop fueling even more to get down to idle, but the engine continues to turn at speed, then when you do stop and disengage the clutch suddenly the engine dies because the ecu cannot introduce increased fueling quick enough to stop the engine stalling. Whereas with the signal from the speedometer cable pickup the ecu knows the car is still moving and even though your foot is off the gas pedal it knows to keep a bit of fueling until the car comes to a halt, and then it gracefully drops the engine speed to idle. In control terms its what I call integral windup, but ecu manufacturers make up other names for it. So if you lose that signal you will probably find that the ecu doesn't like periods with your foot off the gas and then going to a halt, it will be unable to react quick enough to give enough fueling to get to an idle.
Second possibility is loss of an O2 sensor, or sensor heater, the engine tends to run OK, fuel consumption will go up a bit, but the ecu doesn't handle the drop down to idle very well. However in this case its a general issue and not just to do with hills (or long periods with your foot off the gas pedal)