I am afraid I do not have any great ideas.
I'll mention a couple things that come to mind.....
Air in the system.......do you EVER need to add more coolant?
A small pinhole.....or slight leak someplace can give you an air pocket......which WILL cause overheating.
My thinking is this.......your cooling system runs with a pressure in it when hot......but when it cools, it actually can have a slight vaccum......this is when it pulls coolant IN from the overflow bottle.
If there is a slight leak.......I'm thinking a loose hose clamp, etc that lets a little air into the system......then THIS could cause the intermittent overheating.
Since this problem does not happen all the time, it could be very difficult to track this down.
There are a LOT of possibilities for a leak.......all the heater hoses, radiator hoses, the hoses that go to and from the throttle body (yes.....even there).
Of course, a leak at the thermostat housing, or a engine part is possible......if you cannot track something down....(the FIRST thing I would check is hose clamps), maybe some Bar's Stop Leak in the coolant.
As far as the thermostat......I noticed that for my 2003, MOST of the aftermarket thermostats physically looked different.........so I bought a Genuine TOYOTA thermostat.
Normally, the radiator fans will STAY on when you have the A/C on........and the vehicle is not moving more than some given speed.
This is to keep air moving over the condensor coils, which are located in front of the radiator.
This (the radiator fans staying on) will also keep the radiator cooler, which also keeps the temperature gauge lower.
I'm wondering if there is an intermitten loss of radiator fan operation.
There are 3 different relays that control your radiator fans......I just read a post this week on one of the forums that I visit about a person having intermittent NO radiator fan operation.
When you pull over to cool the motor.......just turning the heat on will INCREASE the cooling capacity of your system.
Reving the engine normally will cause MORE heat.......as the radiator fans are electric.
Next time you pull over.......LEAVE the A/C on.......and if you can get out of the vehicle safely.......raise the hood and CAREFULLY check to see if your radiator fans are running.
AGAIN.....I'm thinking of them sometimes not running (an intermittent issue).
You have several temperature sensors......
The temp gauge usually has its own sensor......it does nothing but control the temperature gauge.
This sensor is located on the top of the motor, at the passenger side.....right next to the sensor for the computer.....but slightly more to the passenger side of the computer sensor.
I think that THIS is the sensor.....green wire to it below the radiator overflow hose that you can see connecting at the radiator cap. (the arrow is pointing to the PCV valve, which is metal on my 2003)
There is a sensor for the computer.
At room temperature, it should be roughly 2K (2000) ohms.
As the temperature increases, the resistance goes down.......gets less.
As the temperature decreases, the resistance goes up.....
This sensor is located on the passenger side of the motor.....next to the temperature gauge sensor.....but very slightly toward the center of the motor.
I think I have a view of it in this picture, where I have the upper intake manifold off....
I think it is the connector that is right behind the radiator cap location.
The AC compressor switch, that OPENS when the AC pressure is above 224psi, is in SERIES with water temperature switch #1 which OPENS when the coolant is above roughly 203 degrees F.......which turns the radiator fans ON......either one of these 2 switches opening should turn the radiator fans on at high speed.
This temperature switch is located more up front.....I cannot find a picture of it right now...but it might even be on the radiator.....passenger side.
Water temperature switch #2 CLOSES when the water temperature gets to around 194 degrees F.
The thermostat is a 180 degree F thermostat.....so the radiator fans will come on when the temperature at this location gets a little warmer.
This switch is mounted into the thermostat housing as shown in this picture, you can see the grey electrical connection on it.