The problem, which strikes me as unusual, is that you've focussed on the sentence instead of the question I asked: Is it precise for verb ''to-fail'' to be followed by a passive infinitive? Having said that, I'm still adamant the sentence ''He failed to be seen by his teacher, cheating in the exam room'' has both its grammar and syntax undeniably correct. It's one that uses a participial phrase to modify the subject, and anyone raising questions over its perfectness must be not familiar with how verbals are positioned.