We extend our previous study of elastic pion-nucleon scattering in the framework of chiral perturbation theory by performing a combined analysis of the reactions $\pi N \to \pi N$ and $\pi N \to \pi \pi N$. The calculation is carried out to fourth order in the chiral expansion using the heavy baryon approach and the covariant formulation supplemented with a modified version of the extended on-mass-shell renormalization scheme. We demonstrate that a combined fit to experimental data in both channels leads to a reduced amount of correlations between the low-energy constants. A satisfactory description of the experimental data in both channels is obtained, which is further improved upon including tree-level contributions of the $\Delta$(1232) resonance. We also explore a possibility of using the empirical information about $\pi N$ subthreshold parameters obtained recently by means of the Roy-Steiner equations to stabilize the fits.