For medium and somewhat hot peppers, the rule is pretty simple. Don't eat more than you are willing to chew. Mostly this is a problem of eating whole seeds or big chunks of pepper you aren't actually chewing up and digesting.
Once you go hot enough, this won't matter. But I guess it's part of the experience.
I've never encountered this problem in real life, only on online forums, so I don't have any firsthand experience.
Maybe if you just eat spicy food every day you'll eventually get used to it and not have that problem? I've eaten (what some may describe as) spicy food for probably more than 90% of the meals in my life and it doesn't bother me.
Maybe some people don't entirely digest/neutralize the capsaicin before it passes through the body. I've also never really had this issue except one time some years ago when I ate half a fresh raw carolina reaper as a dumb drunk thing, which I assume has loads more capsaicin in it than what I normally ingest from spicy food.
well, that's what happens to me, even with a small quantity, every single time. And I know it's the chili because it burns like the mouth did the previous day