It is, Android handsets are not prevented by Google from selecting an entirely different operating system if they distrust the one installed by the OEM. It is expressly the choice you would make if you expected userland encryption to be mandated broken.
It doesn't protect against every attack (eg. Stingray or evil maid) but it absolutely would protect you from a situation like the one in the OP. Breaking your encryption can only work if the OEM controls your phone more than you do.