From your description it appears to be a relapsing form of typhoid
which is associated with a carrier state.Was your each episode of infection confirmed by lab reports. If yes then you need to undergo bile and stool culture.If bile culture is positive then cholecystectomy
is the solution. If negative then vaccination
is the answer.Modification of your food habits is pivitol. Eat only home cooked food and drink clean and potable water. If all is negative and well then you need to strenghten your local Gut immunity by ingesting glutamine sachets usually one per week.