I actually accidentally do this long time ago. If I am not wrong, revenge 2 times. When you fail 2 times, go to normal raid, search for new opponent and attack. The revenge counter will reset to 0.
You can see that he didn’t attack 5 times in row. He attack 2 times, stop for some time, and attack 3 times.