This why I will only ever use a smartphone with LineageOS (formerly CyanogenMod). Supported until your phone dies, putting aside the firmware.
Unfortunately, you have no options at all for having a modicum of control / openness over your firmware if you want to use a smartphone. Gotta use/build your own odd device if you want that.