I have something similar, where after I get too stressed, or too much physical activity, eat the wrong thing, or lay down too long- my stomach will start to hurt, and if I keep moving too much, I will start randomly gagging on and off. It makes it hard to keep food down if I ate something before these bouts of gagging.
I only developed this a few years after I developed my symptoms in 2019, so I'd say 3-4 years after my initial symptoms, this was another new symptom I noticed: The gagging and random nausea. I usually just take my prescribed nausea and stomach-movement reduction pills to stop it, they do help.
Are you doing anything physical or stressful that brings on these bouts of gagging?