Putting cables in thicker and more flexible insulation, and a little bit longer, should do the job
It's a good idea to use the most appropriate type of cable you can find for this job.
It fails because it is bent through a sharp angle every time the hatch is opened or closed; this is an inherent design weakness that you can't easily fix.
So as far as the individual cables are concerned, both the conductor cores and the insulation have to be made from materials capable of withstanding this repeated flexing.
The OEM cable used in the factory isn't up to the job, and standard automotive cable is no better, which is why so many repairs are now themselves failing. If you look at the photos folks have posted here of actual wiring failures, you'll see examples of fatigue cracking in both the cable insulation and in the cable core.
A better type of cable would have many more, but finer, individual strands of wire for the conductor, and use a fatigue resistant insulating material such as silicone, rather than PVC. The kind of cable used for test leads is what you're looking for; some of these will have as many as 600 individual strands in the copper conductor.
One potential place to look for this is an outlet selling parts for radio controlled model aircraft, which also need to be wired using highly fatigue resistant cable (because of the constant vibration) and where cable failure is likely to be catastrophic.
A similar kind of cable failure is sometimes, though fortunately far less frequently, reported for the door wiring, for the same underlying reasons.