Is there a way to predict malfunction of a gear and sprocket in garage door opener?

The most telltale sign of your gear and sprocket about to break is a sagging chain or belt. Or if the door is extremely heavy it will wear the gears a lot faster than normal. Even if a 1000 lb. wood garage door is perfectly balance with its torsion springs it is still a 1000 lb. door and still puts a lot of extra pressure on internal gear parts.

chain or belt sprocket is about to break?

The best way to tell if a chain or belt sprocket is about to break off is inside opener. You will have to take off the cover on the unit. Once cover is off look for the big white plastic gear. If there is a bunch of black metal dust on the top of that gear than the sprocket is rubbing too hard on its slot and eventually shears off sprocket kinda like a metal cutting Lathe.