Interesting theory.
My own view on Guiliani's failure actually mostly has to do with his "brand" faltering against substance than even my own cited biographical/social issues. The less you know about Guiliani, the more you like him. That doesn't really favor a long campaign, let alone "I'm going to win the seventh state filled with New Yor's elderly population" either...
Guiliani was never that much of a candidate for his personal issues to emerge, but I don't think he's particularly relatable to suburban married types.
And this is coming from someone who finds Guiliani mildly appealing..
I never supported Rudy for President (though I definitely would've voted for him in November) because I didn't think he ran on the right message. He concentrated on 9/11 recovery too much, IMO, when he was only in office for about 3 months after. Plus, there was a lot of criticism of the city's preparedness for a terrorist attack in light of the 1993 bombing. Basically, I think the 9/11 argument would eventually start to turn against him. Not to mention the fact that he vouched for Bernie Kerik to run the DHS and all the problems that caused.
I think he would've been better off running on a law-and-order message, focusing on the fact that he was a very successful federal prosecutor and was an effective crimefighter during his mayoralty. This is also the reason why I think he'd make a better Attorney General or FBI Director as opposed to President or Secretary of Homeland Security.