I’m particularly curious about how states and rulers combated corruption by tax collectors/farmers and other officials.
I can speak for the Later Han. A large Empire under the Son of Heaven in a long-lived dynasty but that meant a lot of people to tax, govern and oversee. So requiring a bureaucracy whose interests wasn't always united with itself or aligned with that of the Emperor and, of course, some appointed might not prove honest.
The issue of a corrupt official might be brought up via an officers memorial raising concerns be it about a plan, court expenses, the administration or about problems of corruption (ideally aimed at a political opponent). On a rare occasion, an Emperor or controller might have a special commission set up to investigate corruption or a particular problem. Of course, this isn't a systematic way to try to curb the problem of corrupt officials.
At court, the Minister of Justice would oversee major cases and review appeals from elsewhere, including in charge of prison at the capital but cases would be brought to him. The Colonel Director of Retainers did have formidable power in the right hands. In charge of the capital region when it came to the law, he couldn't try cases himself but he could investigate even the imperial clan and extensive powers of arrest, this could prove a problem if the current holder of the post was against a certain faction and unafraid to go hard.
The Palace Assistant Imperial Clerk, with Imperial Clerks under him, would read and sort memorials, including the cases from the Justice Ministry, but if something in the report or memorial grabbed their attention, they could investigate and impeach. Sometimes an Emperor might send such Clerk's or Councillors out on a special mission to investigate a particular matter. Sometimes the Emperor or a senior official would ask the Imperial Secretariat, a powerful body that wrote the Emperor's orders, to investigate matters particularly in cases of lese-majesty or impeachment.
In a provincial post, the new appointee would be expected to check the work of the predecessor and report problems. Each province would be headed by an Inspector (in the capital, Director of Retainers would handle a similar post) who supervised the local administration, with the help of local staff like an Officer of Merit, and figures like Grand Administrators of the commandaries.
The Inspector would be reporting to the throne any breaches like corruption and raising armies in times of trouble. While they were paid less than the Grand Administrators and of junior position in theory they had a lot of authority, including the right to nominate an official a year and would tour in the eighth month of the year to sort out any problems. The Inspector would have Attendant Officers who could tour the commanderies in a province, as a commandery level Investigators checked the counties under Magistrates (some of whom would be paid more then the inspector of the province).
Such officials, be it the Clerks or a Commissioner, could face a problem if the superiors refused to act. It is all very well complaining about the controlling family or their supporters but if no action is taken, it is little more than a protest. Which might be useful to an extent in terms of getting the word out there and raising one's reputation but not in terms of a result. An overly rigorous official could sometimes create unease among those they were required to work with and be moved out of office by a rival faction or as an act of protection to save their life, better that than being murdered or brought down and executed.
At a local level, there were other problems. A Magistrate's circuit could encompass ten thousand households so that is a lot of people to keep an eye on and even if one is inclined to do, there were other problems. A member of the provincial administration was likely of the same class as the wealthy landowners he was in charge of investigating. Their clients serving in local offices including potentially on the inspector's staff and their friends/family/clients might well be serving in your home area. Or have connections and family members at court to complain to.
So why create enemies from those with armed retainers and who had connections that might retaliate against your family? Besides, if they revolted then there is a risk the blame would pass onto you and that would be your career in trouble. So why not play nice with your fellow gentry and negotiate what tax they might pay? Even if the broken tax system and the not always reporting of taxes slowly drained the power of the Later Han (which was more of an issue then the tax collectors being corrupt for themselves)
An inspector if he wished to clamp down on such behaviour faced similar problems. He needed the local officers, he needed to keep the local powers onside so he could keep the peace. He starts acting against his local officers, he risks problems in the province and word getting elsewhere.
I would suggest Inspection and Surveillance Officials Under The Two Han dynasties by Rafe De Crespigny, covers Former Han (which I'm not qualified to talk about) and how the systems changed over time to reflect circumstances of the day in both Han dynasties.