  We investigate the quantum chromodynamics (QCD) corrections to hadronic final
states in electron-positron collisions at $\mathcal{O}(\alpha_s^3)$ in the
strong coupling constant $\alpha_s$. Namely, we analytically compute the total
cross section for this process by separately integrating the tree-level
five-parton, the one-loop four-parton, the two-loop three-parton, and the
three-loop two-parton matrix elements over the respective phase space. All the
contributions to the calculation are treated in a common framework whereby
phase space integrals are expressed as physical cuts of the four-loop two-point
function. We check the cancellation of infrared poles at all colour levels and
we reproduce the known result for the $R$-ratio at order $\alpha_s^3$.
