Such a pity that so many systems all end up inventing their own things. Thankfully the z-cam e1 also had a pretty useful decent http / rest interface for a bunch of the basics too.
It just seems like products would do so much better for themselves if they could exhibit & open their books. I remember seeing the jeep hacks (2015) and rather than being terrified and afraid, just being so so so sad there was such an incredible extensive easy to use well-known control system, for all the car, that would be so cool, but had been for-all-times inaccessible and now absolutely certainly with the scare coverage would definitely for sure be lost to us forever.
This paragraph stood out a little to me:
We only need two pins (which the STM32 is total overkill for): GND and a GPIO. The only thing really making this harder than just turning it on/off is that we need to both read the voltage and write it but this protocol is so slow you can literally just change the type on the fly lol—or as we are doing, just making it both an in- and output.
There's like two levels of semi out of the box thinking here: one is the solution the OP came up with, the fact that even if a pin is in output mode, the input circuitry often still just works so you can read the pin. The other is of course to connect the signal to one more external pin (the OP even made a point of there being a huge abundance of pins) and program that as a permanent input (electrically I believe this is safe, inputs are high-impendance, but a series resistor wouldn't hurt for semi-low speed signals as far as I know).