As an automotive engine mechanic with 35 years of performance oriented experience and 29 years of that with ASE Master Certification and about a dozen other engine specific certifications. Twenty or so years ago I trained to be a piston engine aviation tech.
So I think I can say with some certainty that I know a thing or three about how engines work and what sort of things can have a detrimental effect on them.
"Thermal shock" is definitely bad for an internal combustion engine. That said, touch & go's will not cause thermal shock to occur in a piston engine, here's why.
Thermal shock is what significantly rapid and drastically uneven temperature change in an engine is called. This means if one or the other isn't occurring then there's no thermal shock occurring.
(To be accurate, it's more a degree of severity, as these conditions happen during normal operation and always will.)
The minimum operating temperature called for by the engine manufacturer is to avoid thermal shock. It is important enough for the manufacturer to stress because it is the only reasonable condition the pilot can produce enough thermal shock to damage the engine. When the engine is below the minimum, applying full power causes the pistons and rings to heat up and expand much more rapidly than the cylinders. This in turn reduces the clearance around the pistons and can dramatically increase the friction. The increased friction compounds the problem by adding to the heat and expansion of the piston. More expansion -> more friction -> more heat... This quickly becomes a deadly self reinforcing loop. Because the pistons can't shed heat to the cylinders fast enough the cylinders don't expand and very quickly there's no clearance and the piston seizes up inside the cylinders.
Rapid temperature change in part of the engine without a matching change in the rest. This is the part of thermal expansion that breaks things. The piston to cylinder heat transfer is very inefficient. But the transfer of heat, to the air from the engine, is even slower. So, once the engine is warmed up, it stays that way till it's parked in the hangar and you're headed out. That's just physics 101.
The alternative situation is not likely to happen and if it did, your last worry would be the thermal shock to your engine as the engine wouldn't be running long enough to get damaged, from heat shock that is. What I'm talking about is full submersion of the engine in water. Given this scenario I am doubtful "thermal shock" would really be on your mind. To be honest, I'm not sure if even the coldest water you could keep liquid is cold enough to chill the cylinders to the point of interference.
The belief that touch & go's cause too much "thermal shock" probably comes from mechanics understanding the cumulative effect of dissimilar thermal expansion caused by repeated full throttle application during the touch & go's, but being unwilling or unable to explain that it is really only an issue during the run-in period of time when the new rings are seating in freshly honed cylinders.
The only other way I can see touch & go's being an issue is if a freshly built engine is put together with too little clearance between the pistons and the cylinders. In the extreme, repeatedly heat stressing the engine could scuff its way to a seized piston. None the less, that wouldn't be thermal shock anyway. That would be builder error and the probable source of stories that say "Touch & go's will blow your engine up!"