As much as I lament the quality of leadership at the moment (and not just in the US) I am not sure that we can equate Afghanistan with Germany.
It is one thing to denazify a "modern western country" that shares most of your values, culture and religion, and that has had institutions for some time. It is another thing altogether to pull off the deal in a country that has never had a working civil society, civil institions, education, etc. Especially if you do not share it's culture or religion, and there is a part of the country that is still actively engaged in a military campaign to obstruct you.
Not saying that it couldn't be done, or that mistakes weren't made. Just that you can't compare the two like that.