In theory - yes. Most amounts of separation will likely mean that some amount of water resistance has been compromised. It depends entirely on which components are in the “compromised” area when it comes to whether you actually gain any risk on this. Generally I wouldn’t be too concerned about this though, as it sounds like you have pushed a loose clip back into place, which will most likely keep most of the water out. I wouldn’t give the phone a bath in the toilet or something like that though ;)
If you are operating the phone under “unacceptable” temperatures (https://support.apple.com/en-us/HT201678). According to the link it is also possible that this is because the phone has been charged, and that this has caused the temperature to rise a lot. Try letting the phone cool down if this is the case. If this didn’t work or if the phone was cold already, it might be a sensor issue, which I don’t think is possible to easily fix. Did Apple tell you what was wrong exactly or did they just give you the quote?
It could be software related, but to me it rather sounds like a problem with the part of the circuit that charges the phone (or the battery itself). It is with some phones possible to boot without a battery depending on the amount of power the phone consumes, and the chargers ability to provide this power.
It would most likely be very hard to upgrade the heatsink itself, however a better quality cooling paste and installing a thermal pad between the case and the heatsink would most likely help a bit. The idea behind the current cooling solution is to push air through the system to cool everything with one fan instead of focusing a lot of cooling capacity on the CPU. If you’re okay with breaking the warranty I’d likely recommend that