Clean-room implementations are people doing corporate CYA, not against copyright, but against patents. Algorithms and software designs can be patented, and that's a much broader (and much briefer, and much harder to obtain) kind of protection than copyright. To get a patent you have to show that the thing you're patenting is both 'novel' meaning nobody did it before you, and 'non-obvious', meaning it probably wouldn't occur to anybody even if they were trying to solve the same problem, unless they got it from you. In court, a patent can be revoked if the defendant shows either of these things to be false.
Algorithms and software designs are not subject to copyright. That just isn't what copyright does. A particular expression of an algorithm in a particular language is subject to copyright, and works derived from it in a really blatant way can get people in trouble; but really blatant is NEVER accidentally. Worrying that you might *accidentally* produce something that qualifies as a derivative work is silly.
IIRC there was a case involving 'Perligata' - which was a system for transforming Perl scripts into Latin-language text that could then be executed by its own script engine. It was very silly, done as a joke, but somebody tried to use it to bypass copyright, claiming that the Latin "translation" of some copyrighted Perl software was not covered by the copyright, because it was in a different language than the fixed form which was copyrighted and there were standing precedents that in human-readable documents translations into another language are allowed. That didn't fly. He got smacked by the judge for a violation of copyright via a "derivative work." Nobody had done the mental work of understanding and translating the code - it was a purely mechanical translation. Therefore it was not meaningfully different from the copyrighted form. There've been a couple others where people just changed a few variable names, but a finding that software is a derivative work subject to copyright is rare, and I've never heard of one that wasn't some completely blatant mechanical transformation.