This question already has an answer here:
Say I fixed some stew that's been in the refrigerator for around three days. Will putting that stew in a pot, heating it up to around 170F (77C), and letting it simmer for a while make it last longer in the refrigerator? And if so, then can this be done (nearly) indefinitely?
I think the answer is yes, because whatever microbes have had an opportunity to take root in the food will have been killed by the high temperatures, but I am not sure about whatever biproducts that might remain (e.g. toxic chemicals exuded by the microbes as part of their metabolism or something).