Four-loop cusp anomalous dimension from obstructions