Surprised to hear this about IntelliJ, have used it for many years without issue on substantially larger projects. Can't say for sure, but your freezes might be a solvable artifact of your setup.
I gave IntelliJ over 8GB Ram (on a 32GB laptop) but keeps freezing because they say it's a Linux kernel problem in the 5.4 (shipped with Ubuntu 20.04/Mint 20)
I have seen quite some companies. and everywhere the same thing. intelij once the beloved replacement of eclipse now gives the same experience as eclipse. insane in memory use. constant indexing and slow scrolling ui's. spontaneous hanging and frustrating slow code hints.
now I admit that it's also a combination of many tabs in Chrome, using docker etc. hell everything became slower last few years.
CPUs just didnt make enough progress I guess.