The machine analogy for organisms was typical of 19th c biology and is still influential in biology, but there are plenty of grounds to challenge it. Chief among them that organisms are (in modern biological terms) autopoietic, that is self organising and self-maintaining. Machines are entirely different to that, as they’re manufactured artefacts which have an external organising principle devised by those who make them.
And the denial of the reality of suffering doesn’t even warrant a counter argument. But something along the same lines is considered in my OP, Is Everything Real Something that Exists? In the terms of that argument, pain is indubitably real, but is not existent as an objective phenomenon.