Well, most (not all) computer software related patents run maybe 20-25 pages double spaced, plus figures. As a printed issued patent, they're a good bit shorter than that page-wise. Very few go a thousand pages long, because it costs extra.
The real problem in the courts is, as you say, that the judges have very little expertise in the relevant arts. Thus, each side presents its expert witnesses who say the exact opposite thing from each other (look hard enough and you can find an "expert" to support just about any argument you might have), and the judges are none the wiser.
At the PTO, you're right that attorneys draft applications to intentionally confuse. Claims are drafted using vague language for the sake of vagueness, which results in claims that cannot practicably be fully searched. The objective is in many cases not to get a good patent, but just something with a patent number on it, because attorneys know that even a bad patent has value if nobody is willing to pony up the cash to challenge it. The PTO is hamstrung in addressing these issues by the case law, which says that vagueness is not the same as indefiniteness, and so we can't reject claims solely for being vague if the scope of the claims can be discerned.
The only place we get any real sanity is (in sparing quantity) from the Supreme Court, who occasionally say things like, this is clearly an abstract concept, so it's not patentable, or this is just common sense, so it's obvious, or what have you. When this happens, it helps the PTO and the courts weed out some subset of the bad applications and patents. But out of all the patent cases litigated every year, maybe one or two of them make their way to the SCOTUS, so arriving at eventual sanity will take a long, long time.