Torture as intelligence gathering doesn’t really work precisely because it’s been known for thousands of years that people break under torture. It’s why as far back as we’ve had armies, only the top generals knew the general plans of battle, where the army planned to move and etc.
It’s why terrorist networks, guerrilla forces and what have you have for ages operated in a “distributed” model where just capturing one group doesn’t give you access to much/any information. The members of that group receive orders to take certain actions a relatively short window prior to the act, and they have no knowledge of who their boss’s boss is or what other groups are doing.
Take the 9/11 attacks, based on what we know most of the hijackers if you had captured them they simply lacked information to give us any idea as to the entire plot. The 13 who were brought in very late, to solely act as “muscle” to overpower the flight crews and keep the passengers in line literally knew almost nothing. Six of the hijackers did have some planning responsibilities but even they individually wouldn’t have been able to give up the whole plot.
Now, if any of them had been captured the whole attack would likely have been called off, or we’d know enough to stop it (i.e. that something was being planned soon for airliners), but as far as usable intelligence outside the parameters of the plot? Even with all 19 captured you don’t really have much more intelligence on Al-Qaeda than you did the day before.
Khalid Sheikh Mohammed on the other hand, is one of only a few people we’ve ever captured that did have a lot of operational intelligence on how Al-Qaeda operates. He was so high up that even if a lot of his specific intelligence about ongoing activities was outdated almost immediately he still had a lot of valuable information about Al-Qaeda’s structure, how its planning/operations work and etc. KSM of course was tortured extensively, probably the most of anyone we’ve ever tortured. How much of that was necessary to get him to tell us what we know is questionable, KSM was a pretty corrupt guy (the Taliban didn’t even like him being in Afghanistan because he was basically a hedonist womanizer and they found him offensive), once captured KSM probably could have been easily manipulated into telling everything of worth without any waterboarding.
I think it’s worth considering even groups with extremely evil intentions don’t really use torture for intelligence gathering. They may use it for various reasons; like because they just want to do it, or to demoralize other prisoners, but for intelligence gathering it’s not a very useful tool. In many countries where the Nazis had trouble rooting out all the Jews by far their most common technique for finding more was a simple bounty system. Some Nazi occupied countries there were very limited food rations, and the Nazis would make it known if you could finger a Jewish person posing as a gentile, or take them to a hidden Jewish family, you got extra rations, or were allowed to skip to the front of the bread line that day. Not tons of gold or promises of an immensely better life, just a promise of some food that day, and people turned on each other. Not right away, but a population pushed to the brink of starvation the Nazis correctly realized that while there would be some people who would rather starve than turn in their friends and neighbors there would also always be some who would choose to turn them in for some extra food.