If you’re crate training, NEVER use the crate as a form of punishment!! Don’t throw him in there, toss a blanket over it and walk away. First, it’s cruel as hell. Second, the sog will fight you as long as he lives every time he legitimately needs to be in his crate. His crate should ALWAYS be a place of comfort and solace.
First, is this a guarding, herding, or alerting breed? If so, then you’re basically punishing the dog for doing what it was bred to do. Learn hand commands, a clicker trainer, and plenty of treats in your pocket TO REWARD POSITIVE RESULTS. I can’t stress that enough!! If the only attention you ever get is negative, how does it make you feel?
Reward the good stuff, and make your puppy happy and devoted.
Next, everybody needs to be on the same page with this puppy. If there are a houseful of people, everybody needs to know how to respond to negative and positive Every. Single. Time. This keeps the puppy from being confused from mixed signals. A confused puppy gets into trouble, even when it’s not his fault. That feels really bad :(
As for the barking itself, I suggest a citronella collar. Each time the dog barks inappropriately, remotely command a quick mist of citronella from the reservoir on the dog’s collar. It won’t hurt them a bit, but they don’t like it.