Thank you for choosing DoctorSpring.
I discussed your concern with our Pulmonologist. Here are out thoughts. Please allow me to list them down for clarity.
1. The cough will directly arise from the stomach. But a condition called GERD (stomach related) can precipitate similar symptoms. (similar to acid reflex as you have suspected )
2. Cancer is unlikely. (stomach and lung both) However if the symptoms are persisting (for more than 4 weeks )+ if any symptoms like weight loss , hoarseness of voice, facial puffiness etc you will need further evaluation.
3. The cough is most likely irritant in nature since it is precipitated by deep breath. However since it is a 4 month cough a baseline evaluation is warranted. I would recommend a Chest Xray to start with.
4. You can take an anti allergic medication + OTC anti ulcer medication like Prilosec for 7-14 days meanwhlile. Steam inhalation twice a day with open mouth can also help with the symptoms.
Do Get in touch with your GP for the Chest Xray if not taken already.
Hope this helps
Feel free to ask followups