As long as most phones stop receiving security patches after 2-3 years the battery is not the limiting factor.
In that case whoever will exploit your phone first is the one who owns it, not you.
It is a shame that security is a popular fetish now, not all bugs are exploitable and there are mitigation, you don't need to kill my device unless it was 100% exploited and it causes problems.
Regarding phones, there'salso third party firmware like LineageOS.