If you’re on a tight budget, an RPi4 4GB is perfectly good. I’m keeping an eye on RPi5 development, but they’re expensive (relative to the RPi4) and still hard to get where I am (Canada).
Honestly though, your RPi2 is so old that anything new is going to feel like a night-and-day difference.
I look at this more as “SSD versus SD+UPS”. If you run an SD card without a UPS, then you’re asking for problems when power is inevitably lost and kills the card. The logical ways to protect against that are to switch to an SSD or add a UPS.
I’ve had exactly one SD card fail on me in five years, shortly after I started using OH. It was an old card, I didn’t have a UPS yet, and openHABian didn’t have ZRAM yet (which reduces wear on the SD card).
My UPS is just big enough to keep my RPi, Internet modem/router, and WiFi AP going through short outages, with a USB port to shut down the RPi if necessary. The RPi monitors it using Network UPS Tools (NUT), which is now an optional component in openHABian.
If and when I do get an RPi5, I’ll probably look into an M.2 hat. But that’s more out of interest than fear of SD failure.
Keep in mind that if you use an SSD in addition to other USB devices (e.g. Z-Wave/Zigbee controllers), you may need an externally powered USB hub or SSD enclosure to keep everything working. @Oliver2 may have more insight on this.
As I understand it, the issue is when rules are first loaded (at system start or after editing/saving), and only with some types of rules (e.g. Blockly and JS Scripting). For the benefit of other readers, I just want to clarify that “loading code into RAM” doesn’t happen every time the rule is triggered. So on a mature system that’s largely left alone, it may be less of a concern (but still an annoyance).
It’s not enough reason for me to switch to 64-bit at this time (I’m still using Rules DSL), but I agree with buying a system that’s capable of doing so in the future.
I think that openHABian now has a built-in option to transfer the system to an SSD, so that you only need to boot from the SD card. However, I haven’t tried it.