The ram (screw jack) should have a clutch that will allow it to slip (a loud clicking) when it reaches the end of travel or something stops the hatch from moving. Mine does. Only problem is as they get older they tend to jam if allowed to run till the clutch slips. Mine gets stuck about once a season. I tear it apart, free it, grease it and all is well again....till next time.
If I can find it I'll post it.
I've been trying to come up with a limit circuit for a while now. One member did draw up a schematic....I have it someplace. I do recall seeing an ad for an add-on box that will do exactly what your looking for, just can't remember where I saw it.