Hmm, I don't know if this will work, cause it's just an idea in my head right now
Maybe try setting a variable to 100 for each piece of equipment you want to make, and after every battle have a random chance of lowering those values by 1. When it reaches 5, maybe give a notice that the weapon's gonna break soon, and when it hits 0, remove the equipment from your inventory and replace it with the same armor without stats and a *Broken* next to it.
Try it and tell me if it works