German business confidence deteriorated slightly in August after hitting three record highs in a row, a survey showed.