You can use a polyfuse for over current. They have positive tempco and as the current passes through them, their resistance increases which means they "trip" since they go really high resistance. Once cooled off, they are back to normal. If you place it near the MCU or if your PCB is small, they can also trip of the ambient gets too hot.
If you want to control the attiny temp itself, that's a bit more involved, but my main question would be, how on earth are you heating up the MCU to begin with? If that's happening, you did something wrong in your design.