I solved Max's fence problem by installing a cable at ground level. It's inside the fence. He can run back and forth and look over the fence, but the cable's so short that he can't jump the fence.

Now - if they could only invent Max-proof screen doors and windows!