It seems like a difficult process for people without modern equipment.
There's a bit of a problem with your premise, which is that management of yeast isn't really that hard. Today we take a lot of precautions to make sure only the yeast we want is present, but if you're not picky about the particular strain, nor the occasional bacterial infection (and I'll note that certain bacteria is a deliberate choice in some styles) there's not that much to it. In fact, there can be nothing to it: beer and wine fermented with wild yeast, which literally just floats in on the breeze (or comes in on the ingredients), was and is quite common.
Wild yeast may have been a common method of yeast inoculation in historical brewing. Many early recipes make no explicit mention of the addition of yeast. The Reinheitsgebot famously restricts the ingredients to only barley, hops, and water. Some take this as evidence that no yeast was deliberately added, and while this is plausible, I'm not entirely convinced. While not perhaps known as a separate ingredient, certain practices were known to get fermentation started better and stronger, both in brewing and baking, and may simply have not been included in recipes. These include mixing in some of the previous batch (now known as "sour mashing"), addition of a bit of spent yeast (known as trub in beer and lees in wine), using bread or bread dough, or even simply not cleaning your fermenting vessel very well if it had produced good results before. Getting a good strong start to fermentation is important to making a clean (non-infected) product, so there would be strong selection for techniques that did this, even if they didn't know why.
So aside from wild and technique-based addition of yeast, when was there deliberate yeast management? Very probably it goes back a good ways. However, records of fermenting techniques are... spotty at best. It's one of those practical things that was mostly passed down by practice, and/or out of the purview of those people who made written records, and it doesn't really leave much of a material trace, so it's hard to say. Certainly the concept of yeast as "the thing that makes bread and beer live" is attested in the early medieval period. By 1557 yeast is explicitly mentioned (by several different names, indicating a rough understanding of what was going on) as a thing that can be added to a proper beer, though not a necessary ingredient. This seems to have been the case for a while: George Washington's famous beer recipe calls for yeast only if the weather is cold, so probably the use of yeast was considered an optional "kick-start" to the process, which makes some sense.
Does "yeast" go back further? The Romans and the Mediterranean world didn't have much use for beer, and wine ferments happily on wild yeast brought in on the grapes, so their brewers [EDIT: vinters, but just accept that I may occasionally use beer-based terminology when talking about fermentation in general just because that's what I'm used to] may not have needed the concept, and what records we do have don't mention it. They do mention tasting the young wine to see if it will keep; if it tastes acid it will not. This was likely checking to see if it was infected, and suggests they didn't have a strong method for starting fermentation. But their bakers did make yeast-risen bread, so they'd at least have some cultural understanding of the bread starter. The "barbarians" making beer up north didn't leave any records of how they did it (or much anything else).
Even older beer is typically made from soaked bread, which may carry some of the bread yeast into the process. While possible, it seems unlikely brewing yeast was explicitly managed at this stage, but the "lucky brewing pot", not thoroughly cleaned, seems likely to have contributed to the success of the early brewer.
So the rest of your question is how. To the extent that brewers explicitly gathered yeast at all, they would mostly have scraped some of the spent yeast and debris from the bottom of a drained fermenting vat. This substance, called trub in beer or lees in wine, has a lot of dormant yeast, and can be used immediately for a new batch or compressed into cakes and stored for a while. Usually one keeps yeast cakes moist and wrapped in cloth or similar, but even when dried out, yeast will last dormant for years. (It's also possible to "wash" it to get more pure yeast, which isn't hard at all, though I don't know how old that practice might be.) You might store the yeast from a particularly good batch, or if your last brew went bad, you might clean your tub and borrow some good stuff from a neighbor; this would seem to be how certain strains of beer yeast were domesticated.
A brewer (which could be a household or a commercial operation, depending on time and place) might also keep a strain consistently alive by simply adding some recent good product on hand to the new batch. Any wine or beer not filtered and pasteurized will contain some yeast, active or dormant, and can help start a new brew.
The equipment needed for this is fairly minimal, and the main concern is keeping things clean. Unsurprisingly, this seems to have failed a lot historically. There's instructions in the records we do have about detecting failed product, and what to do about it (which was mostly "avoid it" or "drink it quickly before it gets worse", depending on if you're a consumer or producer) though very little on how to avoid it. Systematic guidance on that would mostly have to wait until the early 19th century and the discovery of yeast as a microorganism, though certainly successful brewers would have hit on what works for them, even if they didn't know why.