In principle: yes, the gut microbiome can be altered by external exposures. It is the large but and a large range of buts that follow.
The newborns indeed get their initial "seeding" by birth, vaginally preferred and from the surface of the mother's body, and everyone and everything else in the surroundings. This is facilitated by two main factors: 1. in the womb the little person is sterile 2. when born the immune system isn't fully developed. Both factors making it way more easy for bacteria – any bacteria – to take a hold.
Under physiological conditions, the fetus is protected from exposure to viable microorganisms. With rupture of membranes and passage through the birth canal, the neonate becomes exposed to bacteria that colonize maternal body surfaces and the environment. These bacteria start to establish the enteric microbiota initially characterized by low bacterial diversity and high interindividual variation. This makes the neonatal and early infant microbiota particularly vulnerable to exogenous interference. On the other hand, the low colonization resistance allows the interventional modification of the early microbiota by oral administration of beneficial bacteria. With time, additional bacterial species colonize the intestine and increase the diversity of the microbiota composition. In combination with the influence of genetic determinants and environmental factors, this ultimately leads to the generation of a mature and highly diverse enteric microbiota that remains relatively stable throughout life.
That means in later life the immune system improves its effectiveness and the ecosystem that initially develops within the gut claims all the niches that are there and defend their own existence against newly arriving species (Hornef, 2018).
We observe three very different things that make an exception to this "stability in adult life":
Commensal and symbiotic bacteria ("beneficial") , as well as unwanted and detrimental ones ("pathogens"), do not exist in a vacuum but under specific, individual conditions. They feed off of your food. Altering the food composition or introducing antibiotics, natural or pharmacologically chosen, alters these conditions and can select in different directions. Antibiotics can even almost erase the ecosystem to point that makes it relatively easy for nasty bugs to spread. (For example until 1978 we called it just "antibiotic associated colitis", but then identified an infection/dominance with Clostridium difficile as the source for that condition.)
In school we were told that stomach acids destroys bacteria and that therefore bacteria will not enter the body via food. For most of the bacteria this is the case.
Obviously, we have to keep certain standards of hygiene when eating or preparing food, as E.coli or salmonella for example can make you sick, not only via their toxins, but by multiplying in your gut and replacing the previous owners of that place.
This leads to factor 3: one or two very resilient pathogens might not cause trouble, but if they arrive in large enough numbers that chances for trouble increases. Conversely, the exact same principle is true for 'wanted' bacteria, like Mutaflor Nissle, S. boulardii, Lactobacilli etc. from fermented foods, sour milk/yoghurt drinks or fecal microbiota transplants.
New bacteria arrive all the time in your gut from all sides and sources and they all try very hard to survive. Many of them do not succeed. They have to arrive in sufficiently large numbers, reach the right place and 'fit in' to the existing neighbours and other conditions.
The extent to which these interactions and alterations occur are hardly predictable. In terms of 'healthy diversity' of the ecosystem in a human gut it may be more beneficial to not wash hands (or even directly ingesting feces) in otherwise unsanitary conditions compared to constantly bombarding the intestines with one single industrialised strain from 'pro-biotic yoghurt drinks'. But in most cases this is decidedly not a good idea. As you can get a really big range of really nasty infections via that 'nowash' way alone as well, it is currently advisable to look really closely at a large range of 'donor' characteristics, if this is indeed to be done as some kind of intervention. Obviously, this cannot apply to the bathroom scenario at all.
From a microbiological point of view, the human GIT can be regarded as the best investigated ecological niche of the human body, although some difficulties exist in obtaining representative samples from various parts of the GIT. Moreover, the human GIT probably represents one of the best investigated microbial ecosystems on earth. This fact can be explained due to the great importance of the GIT microbiota in maintaining and driving human health, disease and well-being: on a quantitative basis, humans can be regarded as a super-organism, consisting of 90% microbial cells and even 99% microbial genes, and the vast majority of the microbial diversity is located in the human GIT (Wilson, 2008).
(Riedel, 2014)
Despite the above, we still do not know nearly enough. 7 billion people, all with unique microbiomes consisting of myriads of species and strains are just too many conditions to analyse. Some of the patterns we think are emerging might be spurious. Just the very general wisdom seems to be certain by now: these mircobiomes are to be viewed as ecosystems that benefit themselves from diversity to gain stability.
References
Hornef, M. (2018). "Microbiome and Early Life" In: The Gut Microbiome in Health and Disease (pp. 31-47). Springer, Cham. doi: 10.1007/978-3-319-90545-7_3
Rosamond Rhodes & Nada Gligorov & Abraham Paul Schwab: "The Human Microbiome. Ethical, Legal and Social Concerns", Oxford University Press: Oxford, New York, 2013.
Christian U. Riedel et al.: "The Stomach and Small and Large Intestinal Microbiomes", in: Julian R. Marchesi: "The Human Microbiota and Microbiome", Advances in Molecular and Cellular Microbiology, CABI: Wallingford, Boston, 2014.