In looking for a better solution on my new favorite website (Digikey) I came across the perfect solution: an AC line montoring optocoupler, in this case the Fairchild MID400. The 24v wallbox signal is input through a single resistor into the chip; it ouputs a clean 5v logic signal as long as there is an ac signal on the input. A couple of resistors make a voltage divider to drop the 5v out of the optocoupler to 3.3v for the pi. $6 at Digikey for the MID400 chip.
The blue trace at the top is the 42v ac signal from the wallbox. The bottom trace is the output from the MID400 chip (3.3v, after voltage divider). Using this approach simplified the code a little bit, as well the interface circuit was even simpler than with the first approach.