Yes. I currently have /e/os on it. I dunno how long devices are kept up to date with that. But if any of the OSes are no longer maintained you can hopefully find one that is. So it's possible it could last even longer than the official Fairphone android version.
I could however see that tech may change enough that a ~10 year old phone may need replacement regardless if you can buy replacement parts.
I have been satisfied with beancount. https://github.com/beancount/beancount and fava as a ui. It's text based so it is easy to automate imports and exports. It can seem daunting at first to create importers in Python, but it's pretty basic scripting.
Text based accounting lends itself well to easy experimentation with version control.
I tried gnucash for a while, but it felt so slow and not flexible enough for me.