Is there any better way of doing this? (Bedrock)

Testing out something for a piston door im working on. Basically, i need to have a flip flop machine activate, then store the button press ONLY when the door is closing.

It works like a regular flip flop machine but connects the charge to a comparator that turns off after the double pistons finish firing

Havent done redstone in 3 years. Any tips would be appreciated.