Powering Pro Trinket using virtual ground

Did you consider splitting R5 into two resistors, one to ground and one to VCC of the MCU.
Then the pin is biased mid-voltage, and only needs a small push to the high and low thresholds of the pin.

R5 is rather low. I would have used 10k or more, and twice that value if you use the above setup.
C3 can be made proportionally smaller for the same low cutoff point.

Then it's also wise to add schottky clamping diodes from pin to VCC and pin to ground, and remove D1.
Might also have double the amount of pulses (twice the resolution) that way.
Leo..