At the very least it can be removed by physically disabling the speakers. So any software measure (eg. locked bootloaders) isn't really worth enforcing too hard.
"Physically disabling" how? Opening the phone and disconnecting the speakers? In my phone the earpiece acts as a second speaker, so calls would no longer be possible either.
If you are really dedicated to the task of clandestine photos, someone could purchase a dedicated point and shoot. Or a secondary phone for which permanently disabling the speakers is not a concern. Or just shoot video.