@Kresimir can give you script which clears everything in Klipper, you’d just have to add “n seconds after last event” part
Here it is: