To the OP: If you are being asked to pay money in a way that will not show up on a deductible receipt - either the yellow Customs receipt, or the clearance broker's receipt - the maybe you have an issue.
If you are fighting an amount that shows up in a line item called "Customs formality," then you are wasting your time. Customs can charge you for research into your case, and no one can question that decision.
If you are arguing about import duty, and the item you are importing is anything other than an item which exactly and precisely matches the Thai nomenclature for a specific Harmonized System code (you can check this at: http://www.customs.go.th/Tariff/Tariff.jsp), then you are again wasting your time. For any item that requires subjective interpretation to apply an applicable HS code, that is at the discretion of Customs. Example: You import fertilizer. It can be classified as fertilizer, or as import of the chemicals that are mixed together to create the fertilizer.
Customs is one of the most powerful organizations in Thailand. You cannot force them to back down. If you hire a lawyer, because you "refuse to cooperate with corruption" - then all you are doing is making yourself feel good - because all the law firm will do is pay the corruption, mark up that amount, and bill you for the marked up fee, as their professional service charge. It is ludicrous to think that a law firm can "sue" Thai Customs. That would (literally) cost millions of baht.
If a fee will show up as "customs formality" on a Customs receipt, IT IS NOT CORRUPTION. It is a deductible business expense - and they have the legal right to collect. Remember - for every day that your container is sitting at the port, you are paying demurrage - and for a container, that fee can quickly grow quite large.
Finally - its is possible that there is simply a legitimate misunderstanding about how to classify unfamiliar items. You can possibly work through that sort of problem. But - do that in cooperation with Customs - not via adversarial combat with them.
Your customs/freight broker is your most valuable partner in most dealings with Customs. If you have bad or dishonest freight broker, that is a separate problem.
The idea of going to lawyer is ridiculous to me - unless the amount of total Customs fee will be 500,000 baht or more. Pyrrhic victories are usually not worth fighting.