I've had three 3-series with sunroofs over the past 10 years, never once had the glass break. My 03 330iZHP had problems with the shade panel getting off-track, but was always quickly fixed by my dealership.
It all comes down to customer service - some people understand what that is and how it's done, others haven't a clue and eventually get replaced. Getting angry with your dealer for poor service is one thing, but letting BMW NA know about it is a step in the right direction.
2013 F30 335i M-Sport 8AT/MPE/MPPK, 2016 228i M-Sport Cabrio 8AT