The official contest blog now states this:

The circuit design, and the ternary coding, were really there just for
the fun of obfuscation.

Yeah. The kind of fun that caused us to give up after spending a day trying to understand how to get the prefix, after having successfully reverse engineered the gate logic and the server’s input string in a couple of hours.