Please excuse the long winded reply, but it's difficult to really explain briefly.
Apex1, perhaps if I explain the situation I found myself in with my puppy it will help you to understand what myself and others are saying. Folks feel free to correct me if you see that I'm wrong!
I have the greatest respect for Kim @Pirates Lair
as he is a professional breeder and trainer and has an amazing program (if you haven't seen any of his videos, check out prior posts!).
Not sure of the appropriate percentage, but I'd guess somewhere around 95% of the issues pet owners or novice trainers have with their dogs/puppies stem from trainer error. And that's why it's really good advice to consult a professional trainer if when you have issues with your dog or puppy. I'm not saying you, or anyone else, can't persevere and EVENTUALLY resolve a given issue, but a good balanced trainer can help you get there quicker and easier, typically with much less stress.
Okay, so in the situation I mentioned in my previous post, I had unintentionally set my puppy up for failure - again, trainer error! My sister had just gotten a new dog, and knowing I frequently exercise my dog at our local dog park (because it's one of the few areas I have access to where she can be offleash), my sister asked if she could ride along. This was the first time my dog had had to share "her" car with another dog. And though she handled it well, when we arrived she was definitely in an unusually agitated state. In hindsight I should not have chosen that particular time for a training session, it was unfair of me. And letting my sister and her new dog go first while I made my puppy wait, added to the unfairness and frustration for her.
But once started, as @Pirates Lair
mentioned, you HAVE to follow through and not reward the bad behavior. I found myself in the same 2 steps forward, stop, move her back into position, 2 steps forward scene that you mentioned, with the dog howling and whining each time we'd stop. I'm not trying here to speak for others, but @Pirates statement below is important, I took the liberty of adding the bold highlight to emphasize my point.
I'm saying you should have corrected your dogs behavior then and there, make it walk/heel beside you until you decided it could run around excited.
I waited until my puppy quieted completely in the correct position for a bit, and then praised and released her - before we got all the way to the entrance. It was a mistake on my part to set her up for failure like that, so I chose to end the session, but only after she quieted - the window of good behavior I mentioned. It only took her a couple minutes, but it's really important for you to also remain calm too, because if you're tense it will definitely take the dog much longer to settle. And it wasn't easy with all the people looking my way and muttering😊.
In your situation, I think your pup's reaction had little to do with any pack issues, and more to do with the introduction of multiple things at once. If Apex is used to walking with you only, and now he's walking with multiple people, of course it's exciting! I don't think you mentioned whether this was his first trip to the beach or not, but the added excitement that comes from investigating a new place, or going to a place that's fun but only visited rarely, is also bound to put your puppy in an agitated and excited state.
Like any training, you build on incremental improvements. Introducing multiple, big changes at once is a recipe for failure. But I understand, life happens. I don't believe a single outing is going to have any lasting consequences. I would suggest asking other family members to accompany you on your regular walks, in your usual spots, to get him used to that. And you might consider taking him to the beach yourself, to practice behaving appropriately. I would even suggest considering going to the beach and walking only halfway, then turning around, going back to the car and leaving. As I noticed with my puppy they learn to expect a given outcome from a series of events, so it's always good to mix things up so that the ONE constant in everything you do requires the dog to focus on you for direction.
I saw early on that I needed to make a conscious effort to vary the order of commands we practiced. At about 5 months of age, I noticed her not paying close attention to me, and just trying to cycle through all of the commands she knew to get the treat quicker! So it really taught me to mix things up.
As this relates to walking and heeling, I try to always vary the order of things. Sometimes I make her heel for a few blocks before releasing her to sniff and pee. Other times I release her at the beginning. Sometimes I make her go for six blocks without a break, other times only a block or two....then I walk really slow for a bit, so that she never knows what to expect!
Dogs live in the moment, delayed correction does not work for anything! So turning around and going home wouldn't teach him anything. Making him sit quietly before releasing him will. And again, not trying to speak for anyone else, but IMHO squashing bad behavior takes on many forms. My puppy became leash reactive toward other dogs shortly after I got her home. To squash that behavior I chose to desensitize her incrementally, by just sitting in the park on the grass watching other dogs walk by at a distance, and then slowly over time reducing the distance until she was able to control herself right next to the path. She now walks by MOST dogs without any reaction at all. But every once in awhile, she for some reason she will still react a bit with specific dogs. Since she's fully aware of the behavior I want to see, when that happens I sternly correct her immediately, and done, we walk on.
I do think that age makes a huge difference in a dog's ability to remain composed in new situations. But I also actively teach her patience all the time. For example, she does not leave either the house or the car until released, and we practice this daily. I also place treats in front of her and even on her paws and make her "leave it" until released. It's good practice.
Again, sorry for being so long winded here, but hopefully you'll find at least some of this helpful! Good Luck!