Fukuda held the powerful post of chief cabinet secretary , the top aide to the premier , for a record three-and-a-half years until 2004 , developing a reputation for damage control and effective management of the bureaucracy .