Not what I'd call a 'common problem', any more than an occasional broken ejector (or extractor) is a common problem with any other make/model of semiauto pistol.
It can happen sometimes, is all, especially when you're looking at a 15-20 year old pistol which may have been regularly used.
I've seen a handful of older vintage issued 59XX series pistols (dating back from the earliest of the 3rd gen production) which eventually required new ejectors, as well as new extractors. (As well as the occasional sear release lever, new springs, etc.)
The small increase in seeing them occur didn't start to appear, as I recall, until the guns had been in-service for 12-16 years, though.
S&W recommends that its LE armorers replace recoil & magazine springs every 5 years of service or every 5,000 rounds, whichever occurs first.
Now, imagine how a well used recoil spring, perhaps combined with the use of +P/+P+ 9mm loads, might accelerate the expected wear & tear of a gun over time. Ejectors can absorb some force while kicking cases out, you know.
Ejectors & extractors can become work-hardened over time, you know.
I've never broken an ejector in a gun I was personally using, although I experienced a chipped extractor in a 6906 when I reached about 12,000 rounds (and it had been previously issued to someone else before I got it).
Just off the top of my head I'd estimate that I may have replaced upwards of almost a dozen broken ejectors out of several hundred guns while helping maintain them over many years. Not exactly something I stay awake at night worrying about in my own S&W pistols.
And if it did it's a relatively simple repair for someone trained and familiar with S&W pistols.
FWIW, if the ejector is broken than another thing to check is the ejector depressor plunger which is located in the slide above the ejector. It's a nylon part and will be colored either black or white. Sometimes when an ejector tip breaks off and someone continues to use the gun, the resulting broken tip can gouge and damage the nylon plunger. Easy replacement, although it requires removal of the rear sight base, which is another instance where an inattentive armorer can snag and bend one of the plunger springs (while reinstalling the sight). I've seen folks continue to use S&W pistols with broken ejectors and chipped extractors and not even realize the parts were broken.
I only discovered my own badly chipped extractor in one of my 6906's when doing a detailed cleaning & inspection after a couple of range sessions where I'd fired a total of approx 800+ rounds ... without any functioning issues.
Parts in traditional metal-framed S&W pistols don't really become expensive until you start having to replace hammers, drawbars, manual safety assemblies and barrels.
The ejector & magazine depressor is less than a $4 part (plus tax & shipping) retail from S&W.
It might be worth a call to S&W to ask about getting it repaired. They may, or may not, offer to cover the repair and shipping. If your 5904 has a rounded trigger guard it may date to when the lifetime warranty was first offered to the public (and not just LE/Gov), and sometimes they aren't fussy about it being a used gun (not the original owner). Depends who you reach.
Might be worth a try.