There are a ton of factors in building a winner, you really need to have a correct group mindset of everyone being "all-in", from the coaching staff through the players, the trainers, the strength & conditioning coordinators, even the administrative people in the athletic department.
At the same time, you are right: a coach needs to know how to win, it isn't going to happen through guesswork or just stumbling upon a correct formula
Best way to turn a program around is recruit incredible pitchers. Easier said than done