How long does it take ALL of someone to die?

Certainly brain death is pretty much how we determine death in most cases these days, but what about all the parts of you, what take the longest to die? Intestinal flora is my guess, but I’m uncertain so does anyone know which part of a person takes the longest to die and how long that usually is?

As a side question, not worthy of it’s own thread, how long is the acid in the stomach still active? Do morticians remove or nullify that acid so it does not eat through into the abdominal cavity or does it lose potency pretty quickly? I mean once you stop replenishing your mucus stomach lining your stomach is pretty much food to dissolve (this is a paraphrase of how my doc poetically described my ulcer to me back when i still drank).