Almost everyone has an opinion on this topic. Many of the respondents on this site prefer independent mechanics but usually have nothing to say about that when a story such as yours appears. I prefer a dealer. Dealers may cost more but they are more likely to have all of the needed equipment and service bulletins for your car. A dealer can consult with the factory for an intractable problem. A dealer will have several mechanics who can consult with each other for support. A dealer’s mechanics will be more familiar with your brand as that is typically all that they work on. If a dealer’s mechanics can repair a difficult problem for more money per hour but more quickly, then you will have saved money which I believe can happen. On a trip far from home; if your car breaks down, would you take your chances with a local mechanic with unknown capabilities or with a dealer who handles your brand? I believe that the answer to that is obvious.
Independent mechanics do serve a purpose as being an alternative to dealers. They help to keep dealer repair prices competitive.
PS, I suggest a dealer in a small town. They can’t be cheaters and last for long as the word gets around. That does not work as well in a large city.