4MB is very, very small if you are running a KRC4 robot. I would have expected at least twice as much.
Maybe take another look if there any other large files around that block memory.
There are some settings around that are said to increase the program memory, but I would strongly recommend making a full image of the controller's SSD before changing any system settings. That way you can restore the old state if you get blocked out of the controller.
Solutions for having "infinite" toolpaths are for example KUKA.CNC (very expensive and not easy to integrate) and the very similar KUKA CAM.Rob and OrangeApps Pointloader.