Can't boot from external APFS formatted SSD
Answering my own question... (happens a lot to me lately)

I did manage to get it to boot from the broken SSD by first booting from a USB drive I prepared earlier with High Sierra install files on it and then installing to the SSD drive on top of the old system.

There was a weird thing happening during first reboot after the installation where my screen would flash and turn off. In fact I think I didn't really finish the installation, I think the installer didn't even copy all the files, but everything seems to work fine now so I'm pretty happy (and my old files and apps are in place).