This forum is on openHAB so your question is somewhat off-placed here.
But why don’t you setup OH on a Pi Zero ?
Using openHABian, it’ll not directly write everything to SD but to RAM so ensure you complement that with a periodic copy to some safe medium, or switch off zram and use a largish commit
parameter
(see Corrupt FileSystems every 2-3 month? - #20 by mstormi).