When looking at BMW stuff I read that you need to replace the coolant tanks and lines as they get brittle and fail bad. Don't know if this was on your model but something to research on the web first. Also read on idle control valve, if it has one, as they can become clogged and just need a good clean out. I.e it may not be a sensor issue.
I don't know BMW,s at all so take the above with a grain of salt but own a couple of euros around that vintage