You may know this, and any litigator on the forum will say: there are many weird esoteric defenses a defendant MUST raise in its answer or it may loose the right to bring them later. Called Affirmative Defenses. Laches, unclean hands, respondiot superior, failure to mitigate, standing.
So defense lawyers raise almost every damn one on the onset to be safe. And then remove the non-applicable ones closer to trial. Malpractice not to do that.
Unclean hands is just like Laches. We all learned about. Ancient principle. I have raised it a thousand times. Just to be safe. Never fully litigated it. Never had a judge rule on it. I don't have a freaking clue what the legal standard you must meet to win on it. And since it's so subjective, could be a basis for appeal.
This fall, I was part of a three week trial with real solid claims of Laches and unclean hands. The defendent first raised duress 9 years after contract signing and after he made $2M.
In the court's finding,he wisely never touched Laches or unclean hands. Didn't need to. he simply found the contract valid. And enforceble.
Sorry for the long answer. But unclean hands is not an affirmative defense you want to bet the farm on.