On a M3, the ECU uses the water temp sensor to determine how warm/hot the engine is; it does not use a separate sensor that is screwed into the aluminum head, like that in the older Bosch FI systems.
I would guess that the BMW ECU would be "intelligent enough" to protect the expensive engine by shutting the car down if it detected a very high water temp from its sensor. If the E39 FI system is anything like the E46 M3 Siemens FI system, try buying a new water temp sensor and replace the old one and then see what happens. If replacing a water temp sensor doesn't appeal to you, take it to a shop that has a OBD II scan tool that can specifically read all the 540's sensors, and any stored trouble codes. Not all scan tools are created equal; most descent one's obtain generic info from the OBD II system, but you want the one that goes beyond generic info; you want a scan tool that can read and test all of the 540's electronics in the engine bay. That is the difference between a $250 scan tool and a $3,000 dollar scan tool. Good luck fellah.