I'm with you - if it is repairable, it should be repaired.
However, doing this for a living (which I don't) will bring up legal issues, at least in Germany you need to be a professional to work on non-low-voltage stuff (other than stuff that could be "plugged in"). Plus costs of labour, which often make a professional repair more expensive than purchasing new. Working on heating, gas and HVAC AFAIK even need a certification. Forget about installing your own plug and play pre-filled HVAC. That's illegal.
I'm pretty sure, *nobody* (a professional) would ever think about repairing that gas valve with integrated security functions - out of liability issues. Using a factory new part moves the liability to the manufacturer.
Then you have the "lifespan" issue - most systems are designed to a lifespan, if something in that system fails and you repair it, it's very likely other parts will fail soon, too.
E.g. my longtime car repair shop will not install used parts, ever. Even if they look like brand new. Easy way to avoid trouble.