Did the keyboard's controller PCB not fit with the ribbon cables inside the keyboard enclosure? I'd think using it and an ADB-to-USB adaptor would have been much easier than reverse-engineering its matrix.
There are two versions of the Apple Keyboard II. Yours, manufactured by SMK and another one made by Mitsumi. On vintage Apple gear, the OEM was indicated by the first letter in the serial number: S or M. The Mitsumi-made keyboards did have a larger PCB but the ribbon connector was located higher up, so maybe it might have been easier to fit.