Note first that my ignorance of Italian is very advanced, you might say near total.
The Garzanti Italian dictionary says “fare fiasco” is possibly from theater jargon, otherwise not definitely explained.
Note however that “fare fico” means/meant about the same. I find evidence of this equivalence in Italian as early as 1857.
Can one of these be originally a humorous malapropism? Or maybe a euphemism? Or even a dysphemism? Which one? Or maybe both?
Cf. “fica” = “vulva”, and the contemptuous hand-gesture called the “fig” ("fare la fica").