Does training to failure at every workout contribute to overtraining? If it does, how far should you come to failure on each set?
It contributes to training only if you cannot recover from it. Quite simply, if you can continue to improve your performance week in and week out using this technique, by all means use it. Chances are, however, you cannot.
Try Ian King’s approach to periodizing your intensity. Just read either his Limping series or Super Strength, he explains the concept there.
Ike is very much correct.
What you've asked is actually an incredibly complex question that every strength coach differs on. Some say train to failure as much as possible, others say never train to failure and then they are a variety of opinions that fall somewhere in the middle.
What this all means is that it is an individual question. Try as many possible variations - always hit failure, avoid failure, hit failure every 3 weeks, etc. and figure what works best for you.
But then that brings up an interesting point: What is failure? - Break down in form, concentric failure, rep speed decreasing, eccentric failure?
So in short, there is no good answer for your question, just more questions.