GrapheneOS, a privacy and security-focused Android-based operating system, has posted a series of tweets on X suggesting that Android should introduce frequent auto-reboots to make it harder for forensic software vendors to exploit firmware flaws and spy on the users.
I remember I was not able to re-lock bootloader after custom rom installation, so you’re probably right. Unfortunately there are not many phones left to install custom ROMs except Chinese ones :/