Wort temp is the important one - your mash will always lag behind your heat-ex temp a little, although if you have an efficiency flow set-up, not for long and not by much. But that's only for Ramps - if you are doing a single infusion at X degrees, then there is (or should be) no difference between the mash temp and the ex heat-ex temp.
Think about it this way - when you start ramping you have the original mash temp... thats the temp of the liquid coming out of the bottom of the mash tun, then you have the temp of the liquid going in the top which will be higher and you have the "mash temp" which presumably you measure in the middle somewhere that you can sort of consider an average. As the heat ex adds heat to the system, all the temps will approach your target temp, the heat-ex temp will get there first, followed by the mash temp and eventually even the wort exiting the MT - then the heat ex will stop adding "ramp" heat and just go into maintaining temps by adding back any losses that occur.
The way I handle it, is to consider the mash in two parts. There are ramps and rests. Rests are when the system has become stable, ramps are getting there. When I'm planning a mash schedule, I look at how long the ramp will take and the temp differential, and I think of it as a pseudo rest at its average temperature. My system ramps to a stability at around 1 per minute, so a typical mash for me might be....
Mash in at 55 rest for 5 mins - ramp to 65 over 10mins - rest at 65 for 60min - ramp to 78 over 12mins - sparge
And that equates mentally to a series of rests with "instant" temperature changes of
mash in at 55 and rest for 5mins - rest at 60 for 10mins - rest at 65 for 60mins - rest at 71 for 12mins - sparge
If you dont account for ramp times, then I find things tend to end up a little more fermentable than I was planning.