There are three main things you can do to reduce the risk of SD card corruption: (1) use a good power supply. Pi needs a minimum of 4.75v and quality USB cable to maintain the spec’s. (2) Only use SD card with Wear Leveling. This means it writes all over not the same place (3) lastly, reduce what you log. You can do it in recorder section in your configuration.yaml