Herd immunity kicks in when a large fraction of the people you encounter were already infected, giving you fewer chances to infect new people. So incubation time doesn’t matter there (though certainly it doesn’t help, for other reasons.)
Alternatively, immunized people.