I have never been in that situation but what about this:
I know that in TWRP recovery there is an option to acces USB OTG. I have one of those little adapters that I connect to my flash drive to save my nandroids and stuff like that. If you wiped your INTERNAL and EXTERNAL storage would you simple be able to mount the USB OTG and flash a ROM from it?
I'm guessing that it wouldn't be that simple...however, if anyone has any actual info on this please share.
Free 15GB storage plus an additional 5GB for using my referral link. You can also get an additional 5GB for every person you get to join! Of course it has a Android app with features such as automatically syncing any photos/videos you have recently taken when you are on WiFi. Give it a shot!