Things to remember: ZSS' Down-B has invincibility but Bair is meaty enough to last through it and hit before her flip kick comes out. ZSS' tethers have no hit boxes if they tether the ledge and from that point she must: Press down or away to release the tether (bad DI), hang on the tether in a mandatory, predictable direction (if the player didn't hold up during the Up-B/Side-B. they will have no DI) or snap to the ledge in a mandatory, predictable direction without invincibility or -- I repeat -- a hit box (think a faster Lucario Up-B).
Probably-incomplete Bair flow chart for edge guarding ZSS: If she's in range for invincible Bair, Bair; if she jumps or Down-Bs, Bair; if you are below her (always prepare for fast fall) and she's facing you, Fair or Bair; if she shoots a paralyzer shot and it doesn't put you in range of her Down-B, Bair.
To be more specific: If at any point she is off-stage, can't foot stool you hanging on the ledge, and she doesn't have another jump or Down-B, grab the ledge. While she's recovering, jump off stage with your back facing her, Bair her on reaction to her not Side-Bing. If the Side B is retreating, you can jump>Side-B (although you're better off letting her continue since it puts her in a worse position) and if she's advancing then grab the ledge (you can stay drifting by the ledge and hold down or away so that you only need to let go of the control stick to immediately grab it).
Once you have Baired ZSS, either grab the ledge if she has to use Side-B/Up-B or Bair her again if you can (and then grab the ledge). As soon as you enter the zone for her Up-B to hit you after ledge invincibility, either ledge roll if she she's at the end of the tether snap distance or ledge release>Fair>delayed fast fall if she'll tether the ledge. If her Side-B will hit you if you continue to hold the ledge, either ledge release Bair if it will tether the ledge or ledge get-up>re-grab the ledge. If you ledge get-up>regrab the ledge and they tether before you re-grab the ledge, Bair -- either they Uair you and you die at ~180% fresh or she gets hit by Bair and you follow the Bair flow chart accordingly.
Differentiating when and where her tethers will grab the ledge requires experience.
EDIT: I mis-read the subject of the question as "edge guarding." My bad.