Sound on iPhone is reasonably complicated when you get down and start "taking it apart". This is because it is managed on a very much case-by-base basis.
For example, if you call up Siri, and adjust the volume, it will only be adjusting the volume for Siri, not something like the ringer volume.
So to divide things up and try to answer your question, I'll start with the basics.
If you turn on Vibration mode (orange position) using the switch on the side of the phone it will turn off almost all sounds. Unlock, keyboards and such sounds will no longer be on. Notifications and phone calls will vibrate but not be heard. You will have to turn the switch off (no orange) in order to hear normal sounds while in apps - (i.e. games). When alternating vibration mode versus normal mode, iPhone remembers your previous state, and will set the volume to what it was before vibration mode was active.
Exception: alarms set in the Clock.app are still heard. In fact, there is no way to turn off Clock.app's alarms from being heard unless you turn off the alarm(s) itself. As for other alarm clock style apps (for example, Sleep Cycle), it is up to the developer to make it behave like Clock.app. That is the case with Sleep Cycle, but it would be worth verifying with any other alarm style app.
If you turn down the volume in the Music.app (or double tap home button and swipe to the right twice), or while watching a video, or in Settings.app, that is the volume that is applied across the board, mostly. That volume reflects the volume for videos, music, and apps that in general make noise - as in, games. Note that iPhone remembers your settings when you have headphones plugged in vs. not.
When iPhone is unlocked and you are on the home screen and you adjust the volume, you are adjusting ringer volume. In other words if the vibration switch is off (no orange) then that would be the volume it would ring at.
Do-not-disturb suppresses basically all notifications (there are some configuration options there). Again, alarms (from Clock.app, and other properly set up apps like SleepCycle) will stay play.
The only thing you can't do is have it toggle sound settings when it is plugged into the wall vs. when it is not. I think you will find it becomes habit, however, to throw the vibration switch.
The late Mr. Jobs felt it was essential to be able to mute a cell phone without pulling it out of your pocket, and/or in the dark, with minimal light disturbance, without having to hold it up to see it, without being distracting to the reason you are muting the phone in the first place. IIRC, he actually described something to this effect at the original iPhone unveiling 29 June 2007
Best Answer
No
There is no way to disable the working of the physical silent switch.
Flash for alerts
If you keep missing calls due to the switch inadvertently getting flipped, you may consider enabling LED Flash for Alerts, a setting that flashes the iPhone camera's flashlight for alerts.
This may help with catching your attention if the iPhone is on silent mode either intentionally or inadvertently.
In iOS 13, the setting can be enabled by going to Settings app → Accessibility → Audio/Visual → LED Flash for Alerts.
Flash only in Silent Mode
While this setting has been around for a long while in iOS, an interesting enhancement to the setting introduced in iOS 13 is the ability to have your iPhone's LED flash only when it's in silent mode.