I have found the solution! Just in case anyone else has the same problem, the solution is very simple: increasing stack memory will prevent writing the AO integrals to disk.
memory total 10000 mb stack 5000 mb heap 1000 mb global 4000 mb noverify
Also, putting
grid nodisk
in DFT section will prevent creation of the (much smaller) grid files.