With wine, people generally mashed the grapes immediately after picking to ensure that the yeast took hold before any harmful bacteria did. Then followed the same process of barrelling it to prevent other microbes from getting in. People also learned that added sugar served to further preserve wines that would be stored for longer periods of time.
If people would have boiled their drinking water, it would have been safe to drink.
No, they didn't - you do not need (or should) boil the water. If you did boil it, you would then need to let it cool down before adding the yeast. Home-brew kits suggest using a fairly small amount of hot water to disolve the malt extract, and to get it up to fermentation temperature.
Beer is safer to drink because the yeast out-competes pathogens, and because it causes a pH change that inhibits and/or kills them.
Speaking as an ex microbiologist.
Boiling is a pretty important step in brewing, both in the home and in the commercial brewery. Yes you could technically make beer without boiling it, but that is not the norm. Boiling is used not only for sanitation, but also to allow the hop oils to isomerize and become soluble in the wort, as well as reduce the wort volume to make the wort more concentrated, since the sparging step produces a lot of diluted wort (when using grains rather than extract). Wort in a can (malt extract) means you may not be concerned with concentrating the wort since you could control that, but you still generally want to isomerize the hop oils.
Your point about needing to wait for the wort to cool is correct, but that's precisely what brewers do.. they cool the wort until it gets to yeast 'pitching' temperature
Now, this brewery was replicating 19th century American brewing, but these ideas probably came from Europe.
How else are they going to get water to a specific temperature before the invention of thermometers?
Boiling is also not only about sterilization. It is also fundamental to the character of the beer. It causes isomerization of the alpha acids in hops which is responsible for the bitter flavors in beer. It also denatures proteins in the wort resulting in clearer beer. See: https://www.love2brew.com/Articles.asp?ID=573
That's how traditional yogurt making works. If you ask most people who know how to make yogurt they'll tell you: 1) you boil the milk, 2) you let it cool, and 3) you add yogurt. The yogurt is the fermentation culture (lactic acid bacteria rather than yeasts) and while making yogurt propagates it, at some point someone needs to make yogurt without already having yogurt. The only way to do that is to start with milk that wasn't boiled because boiling kills the culture (the bacteria in yogurt are thermophiles but they won't survive being boiled!). Perhaps something like that happened with brewing also?
Or maybe it's more like modern cheesemaking? Nowadays most cheese is made with pasteurised milk. To make cheese, the milk has to be cultured with lactic acid bacteria, but pasteurisation kills those off. So modern cheesemakers add lyophilised culture to their milk after they pasteurise it. Traditionally though the only way to obtain culture was to leave the milk alone, use it raw. Back in the day people didn't even know about the existence of bacteria so they had no reason to pasteurise their cheesemaking milk in the first place.
So how old is the practice of boiling the water for beer? Is it possible it's something that's only done today thanks to the knowledge of microorganisms?
https://www.thehomebrewforum.co.uk/threads/beer-from-kit-boi...
For a limited time. The live cultures and then alcohol in fermented drinks keep the bad bacteria at bay.
Keep in mind in the past, not everyone had a convenient source of heat in their homes.