I have no doubt that the systematic comparison of the desired and the actual gate structures, going from LSB to MSB, is a valid and comprehensive solution.
I’m not fully certain, though, that my Julia implementation is able to discover all sorts of discrepancies with the gates. In other words, that when an anomaly is found, it is able to correctly figure out which wire is swapped with which. I think it is able to do that, but I didn’t prove it, nor did I test it on other inputs, except my own.
Anyway, that’s all I have to say on the topic. Feel free to test my solution on your input, if you’d like.