First you need to choose the right kind of cable. There are some really flexible cables out there including instrument wires which are extremely flexible.
Generally the more strands the better for flexibility, however too much flexibility is also hard to control. It is often better to go with a stiffer cable that can carry the current and is flexible, but also rigid enough to form into loops and coils. Something like heavy speaker wire.
When crossing hinges and joints DO NOT go straight across. Instead detour the wire through an S-Bend so it twists rather than bends as shown in the upper image below. (Note you are looking down on the hinge, hinging action here is in and out the page.)

If it is a really extreme bend, or you need the cable to stretch a little through the motion then you may also want to consider coiling the cable through that S-Bended.
Coils and loops should also be employed wherever the mechanical motion ends up stretching the cable, for example, going round the outside of a hinge.
Control the stress. All cables should be firmly anchored using tie-wraps or other features so they have limited motion where they are not supposed to move, and controlled stress where they are expected to move.
Also, take great care to avoid chafing on other moving parts. Especially when travelling round a sharp metal edge. The wire may survive but the insulation may fail resulting in a short. Where necessary add plastic material to the metal on those edges to provide a softer, insulated edge.
Any and all connectors or soldered connections need to have their own stress relief.
ADDITION:
Before you start, figure out your longest length and test the setup up on the floor with that much cable. Finding out you have too much voltage drop along the cable after you tie it all down is rather annoying and embarrassing.