The problem with the S_COM_PORT_OPEN_FAIL (1013) was that I was not running SP Flash tools using sudo.
Once I got that running, I flashed a different ROM: 3.0.4_freezerhd.zip. I don't remember where I got that ROM. In any case, if one of you needs the ROM just ask me. I don't know a place for storing it long term, and I'll keep it while I have the device (which will be until it is too old to be usable)
That worked, and my device was able to boot again. It seems that it's almost impossible to brick the device if you have SP Flash tools and the correct ROM, because that tool works low-level and it's capable of downloading a ROM to a dead device.
After recovering the tablet I just followed the instructions:
https://docs.ubports.com/en/latest/userguide/install.html#install-on-legacy-android-devices
Once I got the old version of Ubuntu Touch working, I installed the newest one (16.04) using the installer. There was a moment where the device was showing a boot menú but the installer was doing something so I waited. After that, it worked and now I have Ubuntu Touch running.
Thank you very much for the project, guys. It's awesome.