I've had that same experience. On new systems I install earlyoom. I'd rather have one app die than the whole system.
You'd think after 30 years of GUIs and multi-tasking, we'd have this figured out, but then again we don't even have a good GUI framework.
I used to use it but it's too aggressive. It kills stuff too quickly.