Have you ever noticed your temperature gauge dropping suddenly under acceleration or bouncing around wildly? The sensor for the temperature gauge is on the top front of the engine screwed into an alumimum water pipe, just behind the fan shroud, shown in the pic below under my index finger. Under my thumb is the engine temp sensor for the ECU.
Remove the black engine harness connector to the temperature gauge sensor and wiggle the spade connector with a finger tip as shown.
Mine was loose, and would wiggle back and forth a millimeter or two. The sensor was screwed tight into the water pipe, but the top rivet that held the male spade end onto the sensor was worn.
This caused poor contact between the sensor and the connector. This loose connection is made worse by engine vibration and fan wind under acceleration.
Flatten out the rivet with a few gentle taps from a punch or awl so that the spade is snug.
After that, my temperature gauge read rock solid once again. I've had to repeat this procedure once in two years.
If that doesn't work the unscrew and clean the sensor with a solvent like brake cleaner. Also, clean and put dielectric grease on the connector. New temperature sensors are fairly cheap, if all else fails.