All you have to do to not flip the car is shift gears right before impact. It instantly applies a huge boost to traction, making it a lot harder to flip, then just swap back after impact.