These symptoms really sound like a transmission that is low on fluid, but based on your previous information it sounds like the dipstick is the correct part and is at the proper level .
Transmission low on fluid? Well, we are using the dipstick to confirm fluid level. I know the recommended way for checking ATF level, so there we are okay. However, my confusion is that my transmission is type A442F (according to the label in engine bay). This type of transmission, as I understand from all available literature, uses 15 liters of AFT on dry fill. But for us, we are using 12 liters (even this is nearly too full according to dipstick - at max level when hot).
I have considered before to disregard dipstick reading and add 15 liters of ATF dry fill, but my own fears have defeated me. Note that we have dropped the transmission three times so far in three weeks. Every time, we drain it fully (even torque converter) and refill with new fluid - even though the drained fluid looks as good as new. Each ATF filling costs about USD 150. Fluid type and source was recommended by local Toyota dealer.
Would a bad temp sensor cause these erratic shifting issues ? I'm not sure, wish I could help more.
I have read that bad temp sensor can cause i) erratic gear shifting ii) loss of power - going to limp mode iii) degraded performance of torque converter. These symptoms are very consistent with my problem. It will not cost me much to check the temperature sensor, so that is my next move given that it is related to the DTC code I am receiving.
Does the fluid still seem clean and new or is it burnt up already ?
Fluid is very clean. I have changed fluid three times (once for every transmission drop). Everytime we drop and and reinstall transmission, we would test-drive about 10 miles. Because problem would persist, we would drop transmission again (draining and keeping aside all fluid). Upon reinstall, we would put new fluid.
The only time we drained dirty burnt fluid was the very first when I first got the problem. That time, the drained fluid was nasty. I have also kept it just for memory.
See attached picture of fluid colors (bottom black one was the nasty first drain, top pink color is for subsequent ones that we have been draining and keeping aside. even current fluid in trandmission is as pink and new.)