Why does my Python script crash Blender (EXCEPTION_ACCESS_VIOLATION)?
Okay, I got it working!
As batFINGER already suspected, it was about accessing a removed object.
I had an Vector variable, which was defined only once.
co = ocean.vertices[0].co

This line is now called every time the mesh changes in my script.
I also added a few lines to update bpy.data.meshes/.objects (I don't know if actually necessary), the whole code can be simplified for sure, but hey: it works!