I have found I have to heat the food on the stovetop, not in the microwave; I don't know why but heating it in a saucepan on the stove seems to result in food that stays hotter longer in a thermos.
Food needs to have some kind of liquidy sauce to stay hot. Plain noodles won't stay hot. And there needs to be a high proportion of sauce to chunky food.
Preheating the thermos with hot water sounds like it should help keep food warm, but in my experience it had little effect.
Somewhere online I once saw some heating rocks, basically, like marbles only larger, that you could heat up and put in the food to keep it warm! That would work as long as you were sure your kid wouldn't accidentally eat them!
They were something like this:
http://www.joulies.com/collections/retail-products