Countries where democracy is in trouble share a common pattern, and it’s a worrying one for the United States.