I've gotten to the point where I can do it about 60-70% of the time last time I played it. Played it twice, got him both times.
The trick is the exploit the c[h]at's movement algorithm; that is, the fact it will move to the closest unblocked edge.
So let it do that while it moves to a place you can block, block it, and complete the fence while he's wasting time getting back.