1. EV3 IR Sensor with multiple EV3 IR Beacons
You could place beacons on different channels and move in a sequance towards them using heading/distance information. This will be limited by distance to sense the beacon and sometimes you have to search for beacon by rotating (you don't sense the beacon direction correctly if IR sensor is pointed in opposite direction).
I have tried following only single beacon - a robot on auto-pilot following other robot with beacon, or hand-held beacon. It worked ok but with limited distance.
You could also use your "setting a default program of moves" with beacons to locate after each longer path segment to keep positioning error bounded (so that you don't have colission eventually).
2. Default program of moves with line following after path segment.
You could split your patrol path into segments of fast straight moves that reach perpendicular color coded paths. Those color coded paths are only used to locate the robot and set it into motion on next fast moving segment. This is opinion based, I have not tried it. This could be the fastest option.
3. Tha Localization part of SLAM
Implementing working SLAM all by yourself is somewhere around master thesis in computer science. Maybe simplier with particle filters. Maybe harder depending on SLAM flavour you choose. It requires knowledge in statistics and profficiency in computer science.
It's easier to only make the localization part on prebuilt map but this still needs a good sensor (like LIDAR) combined with odometry and delgating computations to PC (so some network communication). Even in this setting it is big and demanding project.
Line Following and Wall Following that you and David mentioned are reasonable working methods.