Scaling ir transmission repeats based on ir recieved

Hi all,

Issue:
To control my amp using one remote, I configured my lg tv magic remote to transmit ir signals which I capture using esphome and transmit the correct ir signal to my amp. One issue is that the remote slowly transmits 1 ir blast every second. (so 20 seconds to drop the volume by 20… super annoying).

What I’m looking to achieve:
I’m looking to have the ir transmission increase the amount of repeats it does dictated by the amount of ir signals it recieves in the last x seconds. so if I press the volume up once, it just increases the volume by 1, but it I hold the volume up button down the volume increases ramp up (ie volume increases by 1 the first time, volume increases by 2 the second time, volume increases by 3 the third time)

has anyone does something similar or have any direction I could go in?