Down smash is usually my go to when they regrab the ledge and I stay on stage. I think it's the only move that can hit below the ledge. Going off stage, Back Air is your best choice.
Just some random useless input to an old conversation because I labbed this once upon a time.
Ryu's Downsmash is pretty reliable for hitting characters on ledge. That being said though, theres 2 catches.
Note: Percentages are estimates, since I only labbed this on half the cast.
1. Against most of the cast, Ryu must hit the Dsmash with his FOOT, not his leg. His leg's hitbox doesn't go low enough
2. Against about 5-10% of the cast, Dsmash will NOT hit the enemy at any point of the hitbox.
The solution to point #2 if you still want to hit them from onstage is hard down tilt.
H-Dtilt will hit, to my knowledge every character except Ganondorf. There may be more characters it won't hit but I'm not aware of them, as checking my old notes, I did every character from left to right going down the CSS until Duck Hunt.
Fun fact about ledge hits:
On 7+ characters, you can hit soft down tilt while they hold the ledge.
(I noticed this on Mario, Luigi, Yoshi, Bowser Jr, DK, G+W, ZSS)
I don't think soft down tilt has a specific hitbox like Dsmash in this case, I couldn't tell.
This is fun because of the Ledge Denial tech. They cannot grab the ledge for 50 frames after you hit them, and the hit has minimal knockback so they're still near the ledge. By doing this you effectively limit their options to just 3:
1. Up-B past the ledge
2. Jump over the ledge
3. Wait, fall, and then recover again.
The best part is if they try the jump option. If they try jumping, just spam soft down tilt again. BOOM. Now they only have 2 options.
Please debate any of this if you've found contradicting cases to what I've found, I'm just a lazy smash 4 player that recently picked up Ryu. Also I know the soft down tilt spiel is very Matchup specific, and not incredibly useful across the cast, but if someone's looking for extreme measures for optimization, this could help.