Ionic 4 - loops in router history

If I navigate from one page to another and back multiple times , I am able to navigate through the whole router history via the hardware- or the browser back button.
I want to achieve that the hardware back button brings me to the same page as the ion-back-button in my toolbar.

Page 1 > Page 2 > Page 3
I navigate from Page 1 to Page 2. Then I navigate from Page 2 to Page 3 and back via ion-back-button multiple times. If I then press the hardware/browser back button, I get to Page 2 and Page 3 again in a loop. Instead I want the hardware/browser back button to navigate to Page 1 if I press it on Page 2.