I, like you, have FREQUENTLY inadvertently silenced my iPhone7. I think it's because the 7's on/off sleep/wake button is now on the side, instead of where it used to be — on the top. Thus, when you want to push the on/off button, you hold the phone by placing your thumb on the opposite side (where the silencing button is) and inadvertently move it to the silent position.
Apple probably wouldn't approved my method, but after a month of missing alerts and phone calls because of a silenced phone, I "fixed" it. Using a sharp Exacto knife, I cut a very small strip (approximately 1/32" x 3/16") of rubber from a rubber band. I then, using just my fingernail, stuffed that piece into the small space on the side of the silencing button (obviously when the button was NOT in the "silent" position.) This soft rubber piece has successfully stopped my inadvertent moving of the button for a month now.
The obvious downside is that you lose the use of this button. I'm ok with that. I'd rather lose that function than miss calls or audio alerts. When I want the phone silent, I turn it off. If you change your mind, the piece is easily removed with a toothpick.