What does the immune system do to stop pathogens that aren't killed by macrophages?
There are two broad types of infection classified by their persistence: acute and chronic infections.

I find that most courses on immunology nicely cover acute infections and their detection, and resolution. In the case of S. typhi, which has the ability to invade host cells such as phagocytes and inhibit their ability to properly function, the case isn't so pretty (1). The same can be said for some viruses like HepC and HIV, or other bacteria like Mycobacterium.

Salmonella spp. have a number of virulence factors. The flagellum of the bacteria actually acts as a TLR agonist that activates phagocytes like monocytes/macrophages and neutrophils, which are often first-responders. Then, the bacteria can facilitate the injection of some of its own proteins into the host cell which does a number of things like modulate vessicle trafficking, suppress cellular functions, induce apoptosis and promote overall survival of the bacterium inside the phagocytes (2).

So normally, and referring to the below figure, the overall reponse to a Salmonella infection is adaptive in nature, presumably because your innate effectors have been stunted:



SRC

You can see in healthy phagocytes that through one of two pathways, protein antigens end up displayed on HLA molecules for cellular immunity to take over. Option B is that another cell like a macrophage detects distress signals from the infected cell and induces cell death in it through receptors or oxidative burst. In the case of Salmonella, HLA expression is down-regulated and oxidative burst can be inhibited so localized, infected antigen-presenting cells cant mount an effective response.

That's not to say everything is de-regulated early on. If you succeed in antigen presentation or innate killing (perhaps a non-pathogenic strain), you will resolve the infection as seen in the above figure: a combination of T-mediated killing, B-mediated killing, NK-mediated killing, and generalized inflammation.

In the chronic case, the pathogen will have escaped the primary immune response, but the system will attempt to continue to resolve the infection. This can lead to a number of things: cellular anergy, cellular hyperactivity, sequestration (see granuloma), chronic inflammation &amp; tissue damage, and so forth. The following diagram is predicated upon viral infections but the immunology is largely similar:



SRC

There are changes to the system that are a result of over-exposure to antigen, and an inability to clear that stimulation. The best way to explain it is that chronic stimulation leads to both hyperactivity and suppression. The constant presence of effector molecules like TNF-a leads to a persistent state of tissue inflammation, which is bad for the tissue, but taken together with the persistent presence of antigen, this may lead to dysfunctional responses by lymphocytes (3).

A particularly virulent infection may be impossible for your immune system to clear without assistance, then, requiring the intervention of gram-negative antibiotics, for example.