Blender 2.8 crashes while compiling scene
This sort of situation is why it is often recommended that you render to an image sequence rather than to a video file. Once all frames have been rendered you can quickly convert the image sequence into a video format.

If blender crashes after 20 frames, then render 15 frames at a time. You could also use a script that will repeatedly start blender and render one (or 10) frame each time.

In the output panel you can enable placeholders and disable overwrite to get blender to only render frames that haven't been rendered yet, note that crashing in the middle of a render will leave the placeholder. This should allow it to continue rendering from where it was when it crashed.

When you have a blend file that causes blender to crash, consider submitting a bug report so that the developers can find why and find a fix for the next release.