The fallacy called kafkatrapping doesn’t represent an argument as much as it represents an accusation. Named after the famous Franz Kafka’s novel The Trial in which the main character is accused of an unknown crime. The only evidence is his denial of guilt.
The fallacy occurs not with the accusation but with the verdict. Accusing someone of something is not that dangerous, the accused has a chance to defend himself or ignore the accusation. Supporting the accusation with the denial of guilt by the accused is a fallacious argument. Therefore, the fallacy occurs.
Although kafkatrapping is absurd, it happens more than one might think in today’s society. As the civilization becomes more aware of the political, sex and racial issues, kafkatrapping is quite common. The instant someone tries to deny the accusations of sexism or racism, the accusers conclude that the person is guilty. The whole point of Kafka’s novel is to note this absurdity.
https://listoffallacies.com/kafkatrapping/
You just made the classic argument for a Kafka trap. One's guilt or innocence isn't at issue in Kafkatrapping. You are GUILTY regardless. Your testimony at a trial is just for show--going through the motions, following procedure. If you are innocent and proclaim such, you are still guilty just denying / lying about it. If you are guilty and proclaim your innocence, you are equally guilty.
If someone refuses to testify in their own defense, or about another, they too are guilty. Doesn't matter what their motivation for refusing is, the conclusion and outcome are predetermined by the court or accuser.