8/31 was set for political reasons.
President Biden’s proclamations in July have clearly been shattered, as he miscalculated how quickly the Afghan Government would collapse.
But given that we now know how fragile the Afghan military/government tuned out to be (even after 20 years of US support), an extended exit would have resulted in similar chaos. Should we have slowly and quietly started the withdrawal and movement of Afghans beginning in March 2020? In retrospect, yes.
Should we have done so with a reinforced US military presence? Yes.
But, keep in mind that the Afghans themselves and US citizens living there likewise felt no sense of urgency to leave.