This is a common problem with these type of campers.....and with the potential to be dangerous !!
Friends had this happen while the wife was 1/2 inside the door.....came down very fast and nearly decapitated her !!
That's why you'll see some oldies put up a piece of timber on all corners so if the cable fails, the roof doesn't fall down..
Wouldn't be hard to design a ratchet system so it locks into place as it goes up ?