You should not follow this approach. It is nice in theory but is not really suitable for real life.
If you use a single motor, you are not able to recover from any tilting due to a slipping wheel. If you have separate motors for the sides, it will be rather difficult to synchronize the motors e.g. while turning on the robot.
You always have to think about a cable or motor failure. Your robot has to be able to hold its position even if you cut some cables or a motor burns out. In your configuration, you have no safety or fallback method.
The easiest fix is to add some more (passive) wheels at one rail beneath your current wheels (distance maybe half the rail distance). This stops the robot from tilting and falling. You can then add encoders to this passive wheel and use this data to control the motor that drives the robot up and down. As its a passive wheel you will have less problems with slip.
(The encoder data will also be an important input for the emergency braking system that your robot has)