Tapeworms do not leave the intestines. They are not mobile species, or at least extremely rarely. What you describe sounds like a roundworm infection. They often travel when disturbed (anti parasitics, immune deficiency or other infection directly affecting them). I know many people that experienced their presence in their esophagus.
You will need systemic meds, several at once for extended periods of time to clear them up. It takes perserverance and patience. It might take about a year or more, given you are on the right path. You will likely discover other infections along the way.