Photo how looks hall sensors, I have hall sensors and optical encoder. Can heat affect the optical encoder ?
Heat can affect anything, but if your temperature is only 57C, it's not normally enough to affect the electronics--most things are good to at least 70C. To know if the heat you see can affect the encoder, you'd have to look up the parts on it to see if you can find a spec sheet for them, to see what their limits are.
If the encoder is not located near the winding, it is unlikely to be affected as early as the halls are, if it gets affected at all. Where is your encoder located?
The problem with the hall sensors vs heat is that they are embedded in the motor's metal right where current flows and creates the heat buildup, so they may be hotter than the average sensor temperature (which appears to be the black wires leading off the top right of the hall board, probably glued to the windings). Depending on how often the readout for temperature is updated, it might miss the spikes of heat made by the windings, but the buildup of heat in the motor's metal core continues, and will eventually spread the heat everywhere in the motor. But you might be having the problems before that can happen, and so never reach the point at which the higher motor core temperature reaches the sensor for the display (or does so after you stop checking it).
Controller set to the optical encoder but I think hall sensors also are used. These are low rpm motors 0-200 rpm
I don't know why a controller would use both types of encoders. Optical encoders should be higher resolution and better able to determine motor position and so better able to drive motor based on that. You would need to check the controller manual for how it reads and applies sensor inputs, and switches between them, to know if this is something that it does, and how to bypass it to prevent the problem.
If the controller is typical, it should only have one kind of sensor connected to it, so that it only gets one set of readings. If it has both, perhaps a problem could be that at some point it gets confused by multiple inputs (though I don't know why it would only happen once it reaches a certain temperature).