Restoring the backup of an encrypted phone
As it turns out, TWRP/nandroid backups aren't encrypted. The encryption layer sits lower at the level of the device.

You can therefore restore the backup on a new device like any other backup simply by using the restore function in TWRP. You have to re-enable encryption afterwards, of course.

This also means that backup data is not encrypted and therefore must be protected in storage. I've never read this anywhere; be aware of the security implications.

Edit: The reason for the above mentioned boot problem was unrelated to the backup. I had the wrong bootstack on the new phone and first needed to upgrade to the most recent stock rom.