I just finished reading The Path Between The Seas by David McCullough. McCullough explains how Teddy Roosevelt and other Americans pushing for the canal were motivated in large part by the prospect of achieving naval supremacy. Alfred Thayer Mahan's Influence of Sea Power upon History had been published not long before and Teddy Roosevelt seems to have taken it to heart. The canal ultimately opened right around the start of WWI which came along with the first military use of airplanes.
So while it is probably difficult to understate the importance of the canal for commerce, is it fair to suggest that aviation rendered the canal less important from a strategic point of view? Or at least less important than Teddy Roosevelt thought it would be? I imagine it was very important for moving troops and supplies between theaters in WWII, but how important was the canal to US military strategy during the cold war and beyond?
The honest answer is sort of, but not maybe in the ways you would think.
Paradoxically perhaps the rise of aviation, and naval aviation in particular at least for a time increased the importance of the canal for military purposes. Mostly because of the geographic distribution of US naval shipbuilding. While there were many critical yards and shipbuilders on the West Coast no Aircraft Carriers were built anywhere but the East Coast(most from Newport News, New York Shipbuilding in Camden, the Fore River Yard in Mass, or the Philly or Brooklyn Navy Yards) and no battleships in 20 years.
So that meant that every carrier that was to be added to the Fast Carrier Force after doing workups on the East Coast or the Caribbean had to get to the Pacific somehow and as time was of the essence the ability to use the canal greatly assisted in building the great Pacific armada as it matured in 1944-45.
However the emergence of naval aviation even in the early 40's saw the desire for better protected carriers without giving up airgroup size would eventually result in the Midway class design, the first of which was commissioned in September of 1945. These ships could carry well over 120 aircraft in a pinch, and also 3.5in of armor between flight and hangar decks. But as a result the ships were simply too big to fit through the existing locks. But as they were envisioned to only operate in the Pacific for the foreseeable future that was accepted as the tradeoff. Though the planned expansion and new set of locks would have been big enough had they been built.
The other factor that has sort of mitigated the fact that modern carriers cant fit through the canal is more detached from aviation though not completely. The US Navy and armed forces in general are far more globally forward deployed than when the canal was built. The USN maintains a roughly similar number of Carrier and Amphib groups in the Atlantic and Pacific with similar trends for other hulls and has for decades. The old Mahanian call for a single large battle fleet that would obviously have to pick which coast it concentrated on had withered away in the face of sufficient numbers to project at least equal force in both directions in the face of USSR naval presence in both directions, while development at bases like Bremerton in WA dating back to the early 40's, or Yokosuka meant that ships didn't need to go back to Norfolk, and even today carriers only need to go all the way back to Newport News for their midlife refueling and complex overhauls while other bases and facilities in the Pacific can do the less intense work being done at Norfolk or NNS for the East Coast ships. While a very similar story is true for the rest of the fleet.