Avoid hitting the curb, by all means. Obvious and not much else to do. That or install an automatic parking system using radar to detect the curb and servos to move your steering, brakes and throttle.
Long ago I saw a device which looked very much like a spring loaded antenna, jutting from...