As hopeful as our theories may be, the reality on the other hand has countless times been demonstrated. Public executions serve nothing more than quenching the blood-thirst of an emotion-driven people. From demands of going to war against the US for the sake of our Afghan "brothers" to denying the true nature of the terrorist scum because they were "muslims" (ironically, both whom we now want to execute in public), we have been ruled by emotions and delivered to our own detriment. Further irony unfolds when the enemy we are fighting is just that exactly because it is ruled just as well by the same force pushing them to the extent of committing unimaginably inhumane acts.
You are, pleasantly, naive enough to place your trust in the maturity of the ever impressionable children of a people who's
educated adults are stupid enough to still be mushed into supporting draconian laws, such as the Hadood Ordinance and the Anti-Blasphemy law. The ones who's whimsical minds thought it fit to go rampaging through their own cities for a cartoon that was published on the other side of the planet. The ones who tore down sacred places of worship of their own countrymen after they saw the Babri Mosque fall. The idea itself, at least in the specific case of Pakistan, is laughable.
Watching people being executed publicly will leave another thing embedded in the minds of those young children and thus in-return the whole of society; common place of death. Our country and people have already seen enough death. Enough that now you only see people mentioning a suicide blast in passing, if at all. I on the other hand would want our future generations to be completely oblivious of it. Where the scenes of blood and dead flesh are completely alien and limited to only the movies. Where the memories of these times are only read in books but lessons never forgotten. I do not digress, this has a point. Once you start publicly executing people the punishment will hold its psychological effect for a time and then it will evaporate. The people will normalise to it and get desensitized from it, which no one needs to be explained as to why is bad (ironically again, the enemy itself is a very good example of the effects of this). This has happened in various regions of the world and countless papers have been written on it.
On the other side if we take your argument solely on the bases of deterring mischief through fear then the best case study again is in our own backyard. You think the Taliban haven't seen how the army is cutting them down? Did these terrorist actually believe they were all going to come out of Badaber alive? You mean to deter those people by threat of death who willingly go blow themselves up in innocent crowds? It's an oxymoron.
A child's mind is a blank slate, intelligent but not wise. It feeds off its surroundings until it assimilates and amalgamates into them. Don't oversell them. This is why you see the children of TTP scum with big sparkly smiles while sawing through the throats of alive men, but on the other hand a kid living in Lahore, Karachi or Islamabad gets squeamish at the very smell of raw meat. This is a war of ideologies less than it is a war of blood. The Taliban are an indirect result of our societal dysfunctionalities while the common people killing minorities for mere words is a direct result. If you want to save your coming generations you need to disassociate your society from anything and everything that is Taliban-ish. The moment you become that which you fight, you have lost. And we were already half way there before the TTP even existed.
Apparently everyone of you knows how to build nations, wonder why then after doing the same thing for more than half a century we have absolutely nothing to show for ourselves accept undeserved pomp and unwarranted arrogance. I on the other hand have no clue how to do it so I read, a lot, on the people who have actually done it. Nations are not built or sustained on emotions, knee-jerk reactions or fear. They are built on civility. We currently have numerous examples of "built nations" in the world of which
none think in this manner. There is tonnes of material out their recording how the various societies of the world rose from dirt and are sustaining themselves there. Even more on the ones who still rub their noses in it. No prize for guessing which blueprint you are advocating and we are following. Read what Jinnah and Iqbal have written and said over and over again. But why would we listen to them? We already know what to do, don't we