I have to admit I don't quite follow you.
First of all, unless you splurge on at least 3 Additional Circuit feats you can't learn a 5th level spell at level 10 since you can only allocate 4 circuits to any one purpose at that time and need to be able to cast the spell to commit it to memory.
If you however did splurge on the feats and are able to cast the 5th level spell, then you can commit it to memory. You can now cast the spell AND have it committed to memory.
When you now learn the level 4 spell by overwriting the circuits of the level 5 spell you still have the level 5 spell in your memory. This would allow you to later overwrite the level 4 spell circuits again with the information in your memory.
if you however overwrite the level 5's memory slots with the information on the new level 4 spell, then that spell is effectively lost to you and you would have to experience it again.
The memory option is merely designed as a small buffer. You can only write memory from circuits or vice versa. It is also not possible to do both at the same time. So you could not "exchange" one spell you have in your circuits with another of the same level you have in your memory unless you have eough free slots in your memory to "save" the spell currently in your circuits first.
In order to have a big repertoire of spells, the circuit mage would have to have either a lot of Circuit Blueprints or wands/staffs/scrolls to subject himself to the spells anew.
The process is basically:
Circuits are O, Memory are X
Lets assume you splurged for 13 circuits and have a 20 in INT giving you 10 memory slots.
You learn a level 5 spell by exposure:
You commit this Spell to memory:
Now you learn a level 4 spell by overwriting the circuits of the level 5 and letting the one remaining circuit of the level 5 go inert:
Case 1: You can now overwrite the circuits of the level 4 with the memorized information of the level 5.
Case 2: You overwrite the memory of the level 5 with the level 4:
The level 5 spell is now lost to you since you overwrote its memory.
In order to have access to both spells and be able to overwrite circuits whenever you need either, you need to have both in your memory.
Hope that clears things up somewhat.