I guess if you only need two more pins this would be okay, but in general, this sounds like a job for an I/O expander chip?
> I want to run an unmodified QMK firmware so I can keep up with updates without having to continually merge my changes into HEAD, and in my research with IO expanders I would have to rewrite the matrix scanning code.
Especially ones tht have an SPI or an I2C interface.