Known issue not only in LineageOS. The problem is somehow caused by the new, improved camera modules.
And before you ask … that the phone reboots when it is supposed to shut down is caused by the new camera modules, too .
Turn off the phone (reboot to recovery or Fastboot mode and remove the battery).
Disassemble the main camera module.
Boot the phone without the camera and encrypt, this should work now.
Turn off the phone.
Reassemble the main camera module.
Boot the phone.
And … after successful encryption the phone will shut down if you shut it down at the point where it asks for the encryption password when it boots .
Edit: If it still wouldn’t encrypt (can happen after a prior failed encryption attempt) …
Other trouble connected to the new camera can be avoided by activating the flashlight (for now). I don’t know whether it works for encryption, too.
This should work for encryption, too (it does on Fairphone Open OS 18.10.0 at least, I checked).
Fairphone don’t support LineageOS, the LineageOS community does.
But let’s see whether Fairphone can address the problem in their own OSes and whether LineageOS could profit from that …