Most vaccines you have today work through B cell stimulation, the antibodies are able to clear the infection.
This works great against many viruses and extracellular bacteria, it does not work well against intracellular bacteria.
Most pathogens that cause disease in the intestine are intracellular bacteria, like MAP, AIEC, Listeria, Salmonella, and making a vaccine that can clear an intracellular infection that invades macrophages is much harder than eradicating something like smallpox with vaccinations.
That's why there is no ''real'' vaccine against tuberculosis. There are vaccines, but they have a low success rate, especially in adults they aren't successful.
That's why there is no vaccine against pathogenic forms of E Coli.
What you need to kill intracellular bacteria is a cell mediated response, you need protective T cells.
I mentioned there are vaccines against TB, but they don't work well in adults, they're the BCG vaccines. It's the best thing we have against mycobacterial infections, it was actually made from M Bovis, not TB.
It's incredibly hard to make a vaccine against mycobacteria and intracellular pathogens in general.
Intracellular bacteria that are able to bypass innate immune defenses do so by by interferring with phagocytosis steps. Mycobacteria like TB, foodborne bacteria like listeria and salmonella, E Coli, prevent fusion of the lysosome with the phagosome.
They literally punch holes into the phagosome when the macrophage tries to engulf the bacteria and they replicate inside the macrophage.
The last step of the macrophage is the killing of the bacteria after engulfment, when the macrophage never gets to that step, it will keep releasing inflammatory signals in the form of signaling cytokine like TNF-alpha and you get chronic inflammation.
At that point you need a very competent T cell response with some kind of vaccine, but it would take a lot of time and effort to make those.