The Max travel setting is found in the Focus module under the Mechanics tab. For a value, try determining a range of steps from the focus position that does not produce donuts and set it below that. That should prevent it from traveling too far from focus and be capable of recovering.