Been out to have a look. That tiny chain just extends the 2nd half of the ramp as it lowers. Its got nothing to do with your problem.
If the door doesn't close - because it senses an obstruction - its because either the runners and tiny wheels need cleaning and lubricating (there are 3 tracks) or its hitting the ramp because it hasn't closed far enough.
The thing that decides when the ramp has closed enough to stop, is a "cam" and a microswitch, living inside that carpeted box next to the door where the ramp motor lives...
There are 2 cams and 2 microswitches on the ramp shaft. (Or cams 3 on some vans.)
ONE of them, controls when the ramp motor stops winding the ramp in. It tells it when its powered it far enough and so to "stop".
You need to FINELY adjust that by 1 degree... Not more! One degree is an inch at the ramp top edge when it lifted up. It will pull the ramp 1 inch further. Move it 2 degrees, and there will be trouble, because the door will try and come too far in, and likely damage the "stop" -- an adjustable bolt near the motor box usually. The bolt goes through a metal bracket and is adjustable. And the door motor can bend this bracket. So be careful and remove the bolt FIRST.
Which of the 3 cams is it? I cant remember. But one cam, controls how LOW the ramp is powered downwards towards the ground. That can cause it to be powered into the ground if you get it wrong... So be aware! You don't want stalled motors, blown fuse etc and the door/ramp all out of sequence. The third cam tells it something else (Which I forget!). I finely adjusted mine 10 years ago, because most come out of the factory set up by a chimp.
Does that help?
You adjust the cams with a tiny Allen key. It locks them in position. Once loosened the cams spin freely on the shaft. DO NOT allow that to happen as finding the correct position will likely burn out a motor before you manage it, bend the closing stops, or get everything out of sequence...
This sounds complicated. Its really not. Its dead simple once you see how it works. To find the right cam put a multimeter across each while you close the door. The one that shows a voltage as the ramp pulls up and stops, needs its cam turning INWARDS very, very, very slightly!