Notice in the end the attacks achieved nothing, exhausted Shu Han, and made it easier for Shu Han to be utterly extinguished by Wei a few years later.
Shu may have had no real choice, but nonetheless their actions shows the most likely outcome of such a course as they were forced to pursue. So when one has an array of real choices, it is total folly to willfully not see the choices and trap oneself into this course of action, especially out of sheer pride.
I don't think so. Although Shu was exhausted by Zhuge Liang's expeditions, Wei was also exhausted by all the attacks. Wei was busy preparing to defend itself against possible attacks by Zhuge Liang and never even thought about anything else, such as attacking others. That actually allowed Shu to survive and thrive. Not only that, although none of the expedition was successful in terms of gaining land, Zhuge Liand and Shu were able to bring back with them much of the resources that used to belong to Wei, such as food and weapons. With the much needed resources, Shu thrived. Just imagine what would happen if Zhuge liang did not launch those attacks. Wei would have attacked them and they would have to be the one defending. This means Shu would lose land, people, and resources, to Wei. And since the battles would have been fought on Shu's lands, they would not have the opportunity to continue their growth since no one would want to farm on or near a battle field. With people gone and land wasted, Shu's growth would be stalled. Yet, by bringing the fight to Wei, it was the kingdom of Wei that faced such problems, not Shu. People of Shu were given the opportunity to continue farming on their own land and Shu thrived because of that. During Zhuge Liang's tenure, Shu was never attacked and Shu's growth was never affected. People of Shu lived in relative peace.
And what happened when the attack stopped? Wei, under Sima Zhao began to attack Shu. And it took only a few years for Shu's defense to break down and Shu completely destroyed. How did it happen? Zhuge Liang laid out a well-planned defensive strategy at the time of his death. Although all the obvious places had been well-defended by Zhuge Liang's student, Jiang Wei, one small spot was ignored. This would be the pass of Yin Ping. It sits in a place that was almost impossible to attack, thus the defense was lacking. Yet, it was exactly this little pass that became the hole that the army of Wei finally punched through. Once this pass fell, the entire defense broke down and those Shu armies that were initially at strong defensive positions now became surrounded and had to face enemy in front of them AND behind them. And this is exactly what I have been talking about. And this is exactly what that Chinese phrase, 久守必失, means. All the attackers need to do to find that one weak spot and punch a hole. No matter how well you defend at other 99.9999% of places, you will lose. This never happened when Zhuge Liang was in charge and was leading the attack on the Wei. Wei was too busy defending and never had a chance to even contemplate the possibility of attacking others.
Of course, the situation that China faces today is a lot different than the 3-kingdom time. At that time, every warlord wanted to unite China and to become a ultimate emperor of ALL China. So a final showdown was inevitable. So all the decisions were made based on that premise. Today's China, on the other hand, does not have such problem. China does not need to unite with anyone and no one absolutely needs to unite with China. All the nations can and should co-exist in perfect harmony. So China does not have to attack anyone. However, possession of the full capability to attack is the key. It is a perfect form of deterrence. And once a highly unlikely war starts, China has the option to bring the fight to them, which is a whole lot better than fighting a war on Chinese soil. Again, this was the thinking by Mao when he decided to go to NK. And his decision was indeed a correct one.