Just a heads up in case anyone has this problem in the future.
I think I managed to fix it by setting "over_voltage=2" in config.txt
This Github issue helped a lot:
Raspberry Pi OS (64-bit kernel) uses kodi to play video kodi will freeze · Issue #5579 · raspberrypi/linux
Describe the bug My environment is Raspberry Pi 4 v1.2 hardware version, using the latest Raspberry Pi OS, the latest version of kodi installed through apt,…
github.com
I have a feeling that "over_voltage=2" may not be enough and that a slightly greater number might be needed if the crash happens again. "2" is a very arbitrary number. I'll see how it goes and if the crash/freeze happens again.