Loss of flow due to all valves being closed is more of a problem for the boiler than the pump. The water in the pump might get hotter than usual, but CH pumps are designed for hot water
I am unsure of the way a modulating boiler works, but the old non modulating gas boiler did not seem to suffer when the water did not flow, it switched its self off in the normal way. I know with oil boilers having a C or Y plan is seen by some as better than S plan due to being able to cool through heating the DHW.
I am unsure about all TRV being closed, with mechanical type the difference between fully open and fully closed is quite high, so set to heat a room to 20°C likely still passing coolant at 21.5°C, the electronic type however seem to be less of a range between full on and fully off, so a higher chance of all being off and the wall thermostat still on.
However it seems they also don't simply turn on and off, I hear the motor running in a series of short bursts, so likely the wall thermostat will turn off before all TRV's are fully closed.
However again with an oil boiler the boiler looks at the out going water temperature, the return temperature is not monitored, only with boilers designed to modulate and extract the latent heat is the return water temperature important. i.e. modern gas.
Running my boiler to give just DHW the motorised valves are closed, and pumps don't run, so can't see in my case how any boiler damage can be the result of closed motorised valves, that is what should happen with a C Plan for DHW only. The only worry is the pumps.