One way to tell if you are producing too much or too little is to consume some protein and take an enzyme formula that has Betaine HCI with Pepsin. If you want a recommendation on that please PM me. If after taking the HCI/pepsin you feel it burn, then you may have too much. If you find some relief then your body is producing less acid and you should continue to supplement
Also, as we age our bodies tend to produce less stomach acid so this is another factor to consider. Also, you can try not eating protein with starches. Either eating protein/and non starch veggies in a meal or starches/veggies. This type of food combining may also alleviate the condition.
It’s really a matter of discerning source and then taking steps to reverse and/or fix the issue.