Competent Foxes will try to fight you close. If you get caught in a combo-lock, mash the B to deploy a can to break it (be wary, it will do you more damage than them, but it prevents them getting a free juggle pass), or if the can is out of reach, use a frisbee (however frisbees have a mixed chance of succeeding depending on your position).
You need to keep on top of Fox players by using light jabs and grabs as appropriate (light jabs to break his fast attacks, and grabs to counter the often inevitable shielding), and keep up the pressure - so forward airs and back airs. If you get space or a breather, frisbee Fox (especially when you think he might try to rush you or side-B), and use that interrupt to follow up with a dash attack (if he stays ground), gunman/another frisbee (if he falls far away) or a forward air (if he jumps).
You'll be dependant on roll dodges, frisbees, light jabs and grabs to do most of your footwork. Once he's airborne and off the edge, use cans to block Fox's up-B and Fox's side-B - hover it approximately where he would be if he were to suddenly dash forward. If the can misses the side-B, try to get in a dash attack if he's close during the vulnerable time, or a frisbee if he's a bit further as a risk-free punish attempt.
The best times to KO Fox are when:
His up-B starts or finishes
His side-B starts or finishes
On ledge grab recovery
With an up-A when airborne (usually when in hitlock or stunlock depending: again, after up-B or side-B can apply)
With an opportunistic down-A (warning: risky) if he harasses you close range
With a can to force him out of range when ledge guarding (if you can force him to the lower quarter of the open space, chances are his recovery move will fail)
Fox will most likely try to KO you with:
His down A at close range
His forward A at close range, especially after a failed smash attack or as a spike on landing
A down air when you're attempting to recover (use can to intercept for free damage or dodge)
His up A at close range (usually as part of a roll dodge read)
Assuming you can keep him out of your close range, his ability to KO is nullified, but be wary of his attack's speed.