I think we shouldn't make this too complicated. I also think that small arms should not blow up in peoples faces and either killing them or injuring them. Therefore equipment failures should just resort to misfires (and other non deadly things if they exist).
The probability of a misfire should be based on 3 things.
1. Amount of times fired, with the probability increasing as the firing increases(could also affect accuracy).
2. The weather (I believe rain is still a problem in this era)
3. Age/condition the equipment was originally in - so if there was a unit armed with badly made guns, the probability should increase.
This will mean as a soldier stays alive longer, the higher chance he is going to have misfires. This shouldn't be much of a problem for line infantry since they will die relatively quickly. However Skirmishers (and possibly cavalry) will be largely affected and will add a new problem for them to face when in prolonged combat.
Artillery is a different manner and is the most likely unit to be maintained. IF a cannon isnt properly maintained I believe it should have the chance to blow up.