MIDI Restarter Start/Stop

Is there a way to replicate this device behavior with midihub? Send start / stop commands, not immediately, but synchronized to the next bar of your track.

Will it work if added between midihub out and device in?

Something like that?

Thanks, this is a very helpful starting point as I’m new to midihub. This is not what I’m trying to do but, the “on beat” management is the basic.
If I understand well, it stops manually and immediately on CC, then restarts automatically on CC next beats count.
On my side I try to manually stop/un-clock an external synced sequencer on CC next beats count, then later manually start/re-clock on next beat count (sending stop will reset the device, while un-clock will pause in place)

Added to that there is an interesting feature in the device that I have linked to:

Second mode: Similar to the first mode, but the stop command is sent one MIDI clock tick before the new bar is reached.

because it’s not clear what happens when you stop on beat, if the current note is triggered or not by the external sequencer.