I'm in substantial agreement with your comparison. To emphasize the irony, the inflated memories of Naval success in the War of 1812 were a major influence in the U.S. rejection of the treaty banning privateers. To underscore how strongly this idea pervaded American culture, consider the following extract from D.D.Porter in 1886:
The Naval incidents of the War of 1812 with Great Britain are better understood to-day by the great mass of American readers than are the naval incidents of the Civil War between the northern and seceding states, which lasted from 1861 to 1865. In the War of 1812 half a dozen frigates and a dozen sloops of war on the ocean, and three small squadrons on the lakes, made up about the sum total of our Navy afloat when the war commenced, and those vessels performed such marvelous exploits, considering the great superiority in ships of Great Britain, that the events, comparatively few in number, have impressed themselves indelibly on the mind of every schoolboy who read of them in books that were put in their hands at an early age: events that were taught them as part of the history of a nation which, previous to that time, had not paid much attention to the Navy, or even calculated that it would become so famed.
- David Dixon Porter. The Naval History of the Civil War. (1886)
Melville mentions the elder Porter's War of 1812 adventures in a Note to the poem "Running the Batteries," in which the younger Porter was engaged.
Note g. Admiral Porter is son of the late Commodore Porter, commander of the Frigate Essex on that Pacific cruise which ended in the desperate fight off Valparaiso with the English frigates Cherub and Phoebe, in the year 1814.
As someone familiar with the history of both Commodore Porter and Admiral/General Semmes, I'm interested in how quickly this note had you thinking of the direct parallels between Porter and Semmes, commander of the cruiser Alabama on that Atlantic cruise which ended in the desperate fight off Cherbourg with the steamer Kearsage in the year 1864.