It looks like what MIGHT have happened is you tried to grab/ZAir Lucina after your shield got hit by her fsmash. Since you dropped shield before shieldpush ended, you slid off the ledge while throwing out the Rope Snake, so he tethered onto the ledge. You tethered close to the ledge, so the "pendulum" length was short, and you had the shieldpush momentum, so you got swung beneath the ledge really quickly.
MAYBE
Yes that's what this looks like -- I've had it with Link it looks similar. When that happens I keep mashing A, I always still get them with a get-up attack.
If you want to tether the ledge from standing on the ledge position, jump off a little and get a nice diagonal angle with the ledge, you can't fail then. What that is useful for is the Zair trump. When you trump normally, you have to time the trump well in order to get your follow-up. But after you grab the ledge with Zair you can act
immediately, so regardless of your timing you can get a follow-up (Bair spike with Lucas, depending on DI of enemy -- or let them jump and hit them, or let them recover low and hit them on the ledge with Dsmash). Furthermore, normally when you try to trump but your opponent buffers a get-up attack, roll or jump, you won't get the trump -- you can avoid a non-perfectly timed tether trump with that too. But, if you trump with your tether and time it perfectly then do a normal-getup, you are in an advantageous position where you are ahead of your opponent in timing. If they do anything but one of the three get-ups just mentioned they'll be trumped -- if they do one of those you can easily punish them because you are already on-stage. This is especially useful against low recovers like Pit and Rosalina.
You can see me take advantage of a tether trump here. You see I did it there from airdodge, because doing a Zair from aridodge will make sure you don't get a buffered Zair (and buffered zairs don't connect with the ledge).