We develop an analytical method to calculate encounter times of two random walkers in one dimension when each individual is segregated in its own spatial domain and shares with its neighbor only a fraction of the available space, finding very good agreement with numerically exact calculations. We model a population of susceptible and infected territorial individuals with this spatial arrangement, and which may transmit an epidemic when they meet. We apply the results on encounter times to determine analytically the macroscopic propagation speed of the epidemic as a function of the microscopic characteristics: the confining geometry, the animal diffusion constant, and the infection transmission probability.