That can indeed be how memories work (to a certain extent). There are many different types of memory loss. Retrograde amnesia, for example, will often involve retaining a lot of physical skills and lots of knowledge, but no real memories of the past.
The show is, of course, making up fake brain science, but the memory/skill aspect isn't the magic part.
I don't know that there's any irony there. In my reading, the passage is actually advocating against such laws. And is aimed at the kind of thinking that leads to such laws.
I don't think he is condoning or advocating for such thinking in that passage - more saying that, if you do want these kind of laws (while he lists some contemporary examples) you have to realise that it won't actually work and will have other, negative consequences. That's not him necessarily condoning the thinking or actual moral standing of those examples. Just pointing out what he sees are the realities of such laws.