To be able to dominate the lawyers' circle, Wu Yuanji definitely had his own special information network. He had cultivated a team of investigators who specialized in collecting all kinds of information for him. Most of them were criminals who had once been on death row, before Wu Yuanji defended them in court and they were ultimately exculpated.
After that, these people became his unwavering followers and loyal intelligence agents.
Of course, the reason why Wu Yuanji had chosen to represent them pro bono at the very beginning wasn't out of kindness, but because he valued their talents.
The defense trials proceeded without a hitch simply because this was a group of highly intelligent criminals. They didn't leave behind too many traces of their crimes, which gave Wu Yuanji ample leeway in their defense; destroying evidence and turning the unreasonable into the reasonable was the first rule of his defense.