Here's a medical article describing spontaneous gastric perforation in two children around the age of your relative. As the article says, this is very rare, but it can happen:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5045918/
I think in your relative's case they tried to attribute a cause and clearly their ideas don't seem to hold much weight today. I wonder also, if the congestion of the lungs they brought in to the equation was perhaps not actually life threatening (or at least not at the time she passed away), but something they included to try and help along the post mortem result because they knew what they had come up with already was not very plausible.