I've actually owned a SX20 IS for a little more than 2 years now and I've experienced no problems whatsoever, even after a friend twisted the lens to zoom thinking it was a DSLR and almost broke it, but despite that, after a while it worked fine except that the AF system does a little more noise than usual. So basically what I want to point out here is that I don't think it's strictly the camera's problem.
Considering this has already happened to 2 of your cameras, I think that the problem might be something that isn't the camera's fault. Here are some of my ideas:
1.- You might be storing it in a very hot and/or damp place, this can usually mess up circuits, especially heat (for example, my PS3 broke down because some of the internal components got deformed because of the heat of prolonged use, although this might be a problem exclusively for PS3s)
2.- If you use the camera for very long periods of time it might get the same problem my PS3 had (I'm not very sure about this, so don't pay much attention to it, but I think it's worth a mention).
3.- Dropping the camera won't do it any good, and these cameras are quite flimsier than a DSLR, although little knocks won't hurt it (although I don't think this is your problem)
4.- Actually, it might have been really bad luck of yours that both your cameras have been flawed, but let's just hope that's not the case.
5.- The conditions in which you've used the cameras might not be appropriate, check the camera's t highest and lowest temperatures for operation and the top humidity it can handle.
Well, those are my theories, they might be right, they might not, but I guess it's worth giving it a shot. Also I'd like to mention that I don't own the SX30, so if it's a problem of the SX30 that your SX20 unfortunately had as well, I don't think I can help much.
Anyways, I hope I helped and that you can find the problem and, if possible, fix it.