The analogy is fine. AI moves us up to a higher level language, and it is understood that higher level languages come with their own leaky abstractions, but the idea remain the same. It is different, but only to the extent that would be expected from stepping up to the next higher level. It's not something completely different. We don't yet have AGI that will magically produce the software before you even knew you needed it. We still need a programmer to write the programs.
It might not be the perfect analogy, but it does show some important parallels and differences. Compilers reason to some extent - for example type inference is definitely some deductive reasoning that I would have to do if the compiler didn't do it for me.
The hallucinations point is a difference and one that we haven't quite learnt to handle yet. Generally, compilers are deterministic (even it it might not feel like it sometimes) and there's a lot of useful properties that come from that.
I have recently put Claude into a CI/CD pipeline and it's made me realise how much I rely on pipelines being deterministic.