Yes. I would say that is the case.
Adan Caade AUN, Sharmake AUN, Siad Barre AUN, Abdiqasim Salad and Abdillahi Yusuf AUN, they wasn't corrupt themselves, some wanted power, they wasn't financial oriented and other was statesmen for the people. Unlike the current generation we have, they had some patriotism for their nation. But unfortunately, the institutions and the other branches of the government was corrupt. Some people that surrounded them was also corrupt or without good intentions.
Election and political management is a different case. Aden Caade AUN was the first African President to peacefully hand over power, the election then wasn't corrupted. The African trend for coups was going to come to Somalia sooner or later.