as this is a common problem with SD-Cards on a raspberry, I have configured mine to delay writing everything.
/etc/sysctl.d/07-dirty.conf should contain:
vm.dirty_ratio = 40
vm.dirty_background_ratio = 30
vm.dirty_expire_centisecs = 360000
In my understanding, that reduces writing to once per hour. Disadvantage, you will loose data, if you have a power outage and no UPS or a kernel halt. But on most of my systems which run 24/7, that is no big issue.