Imo, Fox is more threatening waiting onstage, you can pressure whatever option they choose from there fine. You can even stay there and shoot lasers at them to tack on damage as they're coming back, this is a great way to push them a bit farther to KO % range.
You also get a hilarious gimp on Villager flying with balloons if you shoot them both, but this is typically not an easy thing to force since Villager can recovery low and give no cares.
D-smash is a good thing to use near the ledge to hit opponents who don't sweetspot their recoveries and don't have hurtboxes in their recoveries that can challenge it. Also worth noting that there is 1 frame where the opponents are not invincible right as they grab the ledge, which you can catch. This takes practice to do.
You'll find there are characters who are just not overall safe to challenge offstage. Such characters might be:



It's not a bad idea to stay fox-trot distance away from the ledge. By being in this position, you can cover a lot of options with a quick movement. Against these, especially, you should stay onstage and watch what they're doing closely. Wait for your chance to hit them. You might find F-smash or short-hop N-air useful for catching ledge getups and jumps from the ledge. F-smash may be punishable but covers a good amount of space, it's Fox's punishing move when his opponent whiffs something punishable close to him.
If you insist on going offstage, N-air is about the only safe move you have, and it only really gimps if:
a) you're fighting someone with a bad recovery
b) you get a stage spike by sending them behind you
You can also stage spike with B-air. I'm not a fan of this, however, since stage spiking is dependant on your opponent missing the tech. Imo, you should watch your opponent first and see how spot on their techs are before attempting a stage spike. B-air offstage is also very unsafe
F-air is alright as well, but it's knockback also sends them up. The F-air spike is good if you get it, but a smart opponent will see it coming.
With customs on though, Fox gets more tools:
Twisting Fox (UpB3, aka Barrel Roll) has multiple hitboxes and more priority than the regular one. You can trap certain characters who are expecting a N-air offstage or different option.
Big Reflector (DownB2, aka Wind Shine) gets a windbox that pushes opponents away, great for gimping linear recoveries.
Charge Blaster (NeutralB3, aka Firin' mah Lazer) is powerful and forces airdodges offstage if you line it up. As Mav said above, it's really good.
Impact Blaster (NeutralB2, aka That ain't Falco Lasers) can catch double jumps and force opponents to use their recovery move. You might be able to predict their option better if they have no recovery left.