Sorry, but are you arguing that it is a problem you might have a 'nearly' expired passport when you want to return to a 'potentially' corrupt country?
I imagine you have other priorities then go to EF, but then I'm not here to judge.
If it comes to that I don't think it really matters. If you have the wrong haircut or lost 10kg and look slimmer in the face could be a potential tick off so...
I was under the impression we are talking about regulations, under 'normal' every day use circumstances.
So before we go any more off topic. I think it is very safe to say that at least with European countries you will be safe as you are free to travel anywhere as long as you have an ID (doesn't have to be a passport).
For everything else, call your airline or embassy to check that out, in the knowledge that in a very large part of the western world it will be no problem at all.