It's finally here, the third revision! With the help of a few contributors, I now have a working input and a 3D printed case!
They key realisation was that instead of doing this broken automatic gain stuff it would be much simpler to get an ADC with sufficient range for all inputs. This greatly simplified everything. On top of that I also replaced my broken MOSFET output stage with an integrated D-class amplifier chip.
The new PCB pretty much worked right away, so then all what was left to do is improve the software.
I finally got around to implementing and fixing a second order IIR filter, which I'm using to band-pass the input to reduce noise, and also to low-pass the final signal to the clicker, instead of this scrappy envelope detector I had before.
SO to sum it up, everything is moving in the right direction, and I hope to finish the first batch of 10 boards in the coming weeks and put them on Tindie.