Well, indeed Napoléon III's foreign policy and military situation was mitigated, yet not all of it was a failure.
In matters of foreign policy, the first direction he consistently followed in his early reign was to break apart the Vienna system of 1815 which had relegated France to secondary power status. That was basically the "make France great again" of his time.
The interventions in Crimea and in Italy, as well the colonial adventures, consistently fitted that pattern. And in that aspect, he was particularly successfull. Not only had he turned the British from implacable foe to friends/occasional allies, but by humbling both the major powers responsible for the Vienna System, he had forcefully reestablished France as a continental powerbroker. Had it not been so, France would have hardly mattered in the schemes of Bismarck. Plus, if the war of 1870 had humbled France and established united Germany as a powerhouse, it only stalled the French for a time. The colonial adventure resumed by the 1880s on the foundations laid by the Second Empire in Africa and southeast Asia, and the Entente Cordiale of 1905 can be traced back to the detente and rapprochement initiated by Napoléon III (to put into perspective, France and the UK had been at war recurrently all over the 18th century, the so called Second Hundred Years War of 1689-1815, not to mention the ancient rivarly dating back to the 12th century).
That's for long term consequences of these policy goals.
Then, there is no doubt that in more medium to short term, Napoléon III was rather clumsy, trying to please everyone while advancing his own interests, more often than not getting overtaken by events, like what happened in Italy, in Mexico or finally with Prussia.
In Italy's case, his initial plans as outlined at Plombières were much more conservative than what happened in the end. He was effectively put before the fait accompli by his Piedmontese allies and the Italian revolutionaries (in a sense, there was a need for Piedmontese to take the reins, else they let the revolutionaries take the lead themselves). Only when confronted with the possibility of Prussian intervention would he take action, to make peace with Austria and protecting the Papal states against successive Italian filibusters. Again, despite pissing off both sides, Napoléon III was able to make good of it, and consistently made overtures to Austrians afterwards, making the Franz Josef brother as Emperor of Mexico for instance, or acting as intermediary (of note, the Austrians never really ceded either Lombardy in 1859 or Venetia in 1866 to the Italians, but ceded the provinces in each instance to France instead, from which point France would retrocede it to Italy).
As for Mexico, independently of the conclusion of this intervention or any other hindsight, the initial calculation was a valid one considering the circumstances and the goal pursued. Even if Spain and the UK withdrew, they weren't against it, so aside of opposition from the United States, the French had a free hand, and Mexico was relatively weak, having barely got over a civil war of its own (the Guerra de Reforma 1858-1861). Establishing a stable regime as counterweight to the rising industrial power of the US, taking advantage of the opportunity provided by the American civil war, was then a relatively safe bet. But that's a bet he lost.
In Prussia's case, we see Napoléon III's constant desire to please and avoid alienating everyone extracting its highest price, compounded with the worsening sickness he was afflicted with, beginning in 1865, that made him even less determined. Hence his blunder in the Austro Prussian war, the negotiations around Luxembourg and finally the Spanish crisis. The thing is, while being personally against the war, he gave in to the warlike mood of the time, of his wife, foreign minister, the people, trumped by false assurances of military preparedness. Undeniably, had he not been so sick at the time, he would have persisted in his opposition to war, giving enough time for Benedetti's account of Ems to allow the deception of Bismarck to falter through.
Else, he would have supported the Poles or the Danes but only if the British had done so. Not wanting to be isolated in the question against Austrians, Prussians and the Russians (who had a pact with Prussia then), he wouldn't go through with it. That said, he didn't forget about it. In 1870, before France was invaded, there was a project of landing in northern Germany with potential Danish support.
Militarily, France was unprepared for the war of 1870. But if Napoléon III hadn't his uncle's genius (not that it mattered anyway since he never really exerted direct command on the field and let instead commanders do the job, be it Saint Arnaud, Canrobert, Mac Mahon or Bazaine), he was aware of the realities facing him.
While the army wasn't clearly suited to continental warfare (the only experience of value since 1815 was the long pacification of Algeria) and had shown severe lacking in Crimea and Italy, the Emperor sought to innovate. In naval matters, he initiated the development of armored ships, puting the French navy ahead of the British for a very short time. In artillery and armament, though the failure to adopt breech loading artillery was significant, the French developed superior rifles (Chassepot) to those of the Prussians and volley guns that had terrible effect when properly used. Ultimately, the main failure of Napoléon III in this domain was his failure to push through the Niel reforms planned after the Austro-Prussian war. After Niel, the main supporter of the reform died, the emperor could not find anyone to get it done as most of the army was very reluctant, if not opposed, to reform anything.
On the home front meanwhile, the economic and infrastructure policies of Napoléon III were much more of a lasting success, from railroad construction to financial revolution. If France had the capacity to finance its war effort in 1870 and pay the war indemnities so fast afterwards, it was due to the financial sector that had blossomed under the Second Empire. While Paris is indeed a legacy of the Second Empire, the most important one was to bring the Industrial Revolution to France.