First of all, Custer's troopers did NOT run out of ammunition! Their guns ran out of troopers first! The companies that formed Custer's battalion were strung out so that they could not effectively cover each other. When the troopers dismounted, in some cases, every fourth man became the horse-holder, reducing the firepower by 25%. In the instance where each man held his own horse (Tom Custer's company, IIRC), accurate shooting with a plunging, terrified horse wasn't very likely. In the instances where horses were either killed or thrown down to form a barricade, those Indians who had bows and arrows, simply fired volleys of high-trajectory arrows, killing or wounding the troopers. The Indians simply overran the troops, cutting the battalion up in detail!
The criticism that Custer "divided his command", while correct in content, was standard tactics in those days. Crook did the same at the Rosebud a week earlier, and the only thing that saved him were the presence of Shoshone and Crow scouts, and armed civilian packers and some Montana prospectors. Also, when he at first sent Mill's down Rosebud Canyon, but then recalled him, and that battalion defiled out of the canyon, putting them behind the hostiles, and the Sioux and Cheyenne saw this and broke off. But Crook had twice as many men as Custer, and perhaps more luck! The only thing that could have save Custer was that which was not available...the ability to get on the radio and call for an air strike, "danger close"!