We have a management structure that allows us to do both peer guidance and detailed project tracking which can help people avoid falling off the rails.
Our problem has never been a deliberately underperforming employee though - all of our issues to date have been people who start doing light slacking or who are too easily distracted/focus on the wrong things. Careful hiring and luck.
I have personally managed a serious problem employee who basically did not want to work and put a great deal of effort into actively avoiding work (writing long soliloquies in "documentation" instead of writing code or meaningful and appropriate docs); that was decidedly unpleasant and exacerbated by the (very large) company in question basically protecting certain classes of employees but refusing to add a resource. In the end it came down to me doing half of his job for him.