Why is DIY yogurt not as stable as sourdough starter? I have a sourdough starter which is now close to 15 years old. It has survived everything - including long pauses where it stood in the fridge for over a month or longer. It is incredibly stable and very hard to kill (at least I was not successful so far). Presumably you can also make a backup by drying it completely and storing it long-term (I have made such a backup, but have not had to use it yet).

Sometimes I also like to make yogurt by sterilizing milk at 90-95°C, then cooling to 45°C, adding existing yogurt, and keeping it at 45°C for about 6 hours.

This always works very well for the first 3-4 generations (starting with storebought natural joghurt). The first generations are extremely nice, just like the original.

But after some generations, it inevitably does not continue to work as well. The next generation will not become as thick, and will be more of a soup; clumps of yogurt mixed with the clear watery substance you get in these processes (sorry, don't know the word in English - is that whey?). I'm quite careful to keep the whole process as identical as possible.

Do you know the reason for that, or if it is possible to get a long-term, stable yogurt running?
First, we are talking about different microorganisms when comparing sourdough to yogurt. Generally, a sourdough starter is populated by numerous strains of yeast and bacteria, while store bought yogurt contains a small number of isolated strains of bacteria.  However, there is no reason that you can't maintain a yogurt culture that lives on. According to the linked article, the isolated strains in store bought yogurt are generally only viable for a couple of generations.  You might look into heirloom starter cultures, as they suggest. That way you can develop a yogurt starter that is as viable as your sourdough starter.