Prevention of excessive use of resources and Blender taking control of the system?

Hi.
I had intended to talk about this topic a long time ago, but now I take the opportunity because when I tried to check if I could reproduce this problem:
https://developer.blender.org/T56897

I’ve gone through the same situation again. Suddenly Blender began to use many resources, in this case system RAM (16GB), the system started to swap on my slow disk and it became unresponsive, I had to hard reset the machine.

The issue is that this kind of problems where using Blender I should kill Blender process or restart the machine happens to me quite often. I know that when it comes to RAM it’s not just Blender’s problem, Linux swap in slow disk was always bad. But on other occasions I have lost control of Blender without giving me the opportunity to save the file, by example when performing some actions with heavy meshes in Edit mode, Rendering heavy textured volumetrics with GPU primary display, other times by wrongly choosing Skin modifier (when I really wanted to choose solidify for example) to apply it in a heavy mesh. I think it also happened to me with Decimate modifier sometime. And maybe on other occasions that I do not remember.

I was wondering if it would be possible to implement some method in which Blender detects when there is a bottleneck or excessive use of resources to give the user a warning and offer the possibility of saving the file and finish/not apply the process which was causing the problem.