Look at the players Bayern München signed and sold in the last four/five seasons. Won't count Renato Sanches and Hummels since they aren't proven at Bayern yet. They signed Coman, Costa, Kimmich, Vidal, Lewandowski, Götze, Benatia, Bernat, Alonso, Rode, Thiago, Shaqiri (sold again), Martinez, Mandzukic (sold again), Dante (sold again), Rafinha, Neuer, Boateng and incorporated Kroos (sold now) and Alaba into the first XI. They signed 12(!) players for the first team(actually more, since I didn't include players like Kurt or Weiser) younger than age 24 in roughly five seasons.
This shows that Bayern are very active on the transfer market. It also shows that Bayern buy mostly young, quality players with great potential (Shaqiri, Thiago, Bernat, Kimmich, Götze, Coman, Costa, Javi Martinez and Neuer. They only buy older players if they're world class (Vidal, Lewandowski, Alonso (not world class, still great and I would say a good addition)) or very cheap (or both), sometimes both. Of course there are a couple of players that didn't succeed, but there are not a lot of those (Dante was good in his first season, Shaqiri decent back-up, Götze was okay and Rode is a decent player considering his role).
Another thing is, if it doesn't work out they can still cash in on those players. English clubs are willing to pay a lot for Götze and Mandzukic, Shaqiri, Kroos and Dante were all sold with profit.
What this shows is Bayern plan ahead. They buy players for the next 4-8 years, not the next 1-4. I would say this more than matches Barcelona, even in the last three seasons.
If you want another example, look at Dortmund (Mkhitaryan, Gundogan, Ginther, Aubameyang, Reus, Weigl, Kagawa, Bürki, Sokratis and now they have secured Dembele and Merino). They have a solid sporting project as well.
There are not a lot of clubs with a solid long term project, but if you want to stay on top of the game this is a necessity. At the moment, Barça don't have one and it clearly shows. Just look at how we all panic here on Barcaforum when an important player leaves. Yet when Bayern sells Kroos or Dante (who was an important defender for them at the time, despite his awful last season) they have a new player lined up to take their place that often even improves the team. I know it's almost impossible to replace someone like Alves and improve, but at least show that you have a plan so that the team can compete at the same level without him.