I think the reasoning of the comic is actually pretty air-tight. Boredom is a mental experience, and such a machine should thus have control of this mental experience, including the control to stop this mental experience.
There's 2 ways to stop the experience of boredom for such a machine:
Provide the subject with enough variety of mental experiences such that they wouldn't get bored anyway.
Manually block the pathways leading to the experience of boredom, so whenever the subject would feel bored, they simply... don't.
I don't see any in-principle way why such a machine would be impossible - why it would be impossible for a computer to accomplish strategy 1 to the best of its ability for a human subject, and occasionally resort to strategy 2 when necessary.