How to fix "Encryption unsuccessful" and bootloop issue on Andriod 8.1?
This happened due to the infamous BLOD due to premature hardware failure of Qualcomm Snapdragon 810 chip set. All Qualcomm Snapdragon 810 chipset will have the same fate after around 1.5 years of usage. Can't believe Qualcomm messed up this bad.   

The instructions in the below linked worked perfectly.
https://forum.xda-developers.com/nexus-6p/general/bootloop-death-blod-workaround-zip-t3819515

The phone is surprisingly pretty usable for daily tasks even after disabling the A57 cores.