Obama (and I might be slightly off on the numbers) was briefly in the Illinois State House and spent about half that time running for US Senate and the brief time he was in the US Senate running for President.
Removing Trump from the equation (his personality that is) ... I would make the case that an executive over a large company or some other organization (a huge non profit for example) has a better resume for President that what Obama's resume was. Again, taking the people out of it and just looking at a resume .. which in itself is obviously not the whole story.
Reagan was a bit different, he was governor or California for 8 years ... that in itself is pretty impressive (again just resume wise)
Edit.
George W was governor of Texas for 5-ish years .. good resume wise
I do not think he ran any businesses into the ground though, he had one bought out and was a partner in owning the Texas Rangers though a pretty good boom period for the team, both on the field and financially
Edit to the edit .. the energy company did take a hit, but that was the case of about every energy company during the mid to late 80s when the prices dropped through the floor,