The ANC appeared on Friday to be on track to retain control of the national government after this week’s election, but widespread voter disillusionment contributed to the party’s weakest electoral showing since the start of democracy a quarter-century ago.