Handy little idea, that's for sure! Pit toilets more or less in one area, I'm sure if there were a visible barrier, he'd be able to catch onto it pretty quick. I probably wouldn't go so far as to build a whole pen for it, but maybe lay a square of bricks or wood somewhere so he could see some kind of barrier.
I might just do that this summer so I can mosey around the backyard barefoot with minimal worry of stepping in an unpleasant surprise, haha.