First thing I did on my Fairphone 4 was to flash iode OS on it.
I don't know much about bootloaders and such, but I was done and happy within an hour after purchasing it.
Also, if I am not mistaken, I think warranty is still valid if you run custom ROMs.
Fairphone is very pro openness 😄
Fun read! I'd like to do something similar if I had any control over my apartments heating at all.. Sadly it is all just manual valves on the radiators.