Sludge builds up mostly on top of the heads, visible under the valve covers. The passageways that clog are the oil drain holes that allow the oil to return to the pan. All of this can be cleaned out without major disassembly, but it is a lot of work.
Unfortunately, some of the sludge will end up in the oil pan where it could clog the oil pump screen, in fact this may be happening now. The low oil pressure after driving for awhile could be due to the oil return passages being clogged up and the oil pan going dry, but if reving the engine makes the light go out, then that is not it.
If you had someone pull the valve covers and oil pan and clean all the sludge out, you might get lucky and have a useable engine for a couple more years, but honestly, this could cost you $400-500 in labor and the odds are against you. If you have metal flakes in your oil, your engine has suffered oil starvation for too long.
Given the evidence of low oil pressure and metal flakes, I'd guess that your main and rod bearings are shot. The bearings are made from a soft metal and lack of oil will cause them to start flaking very quickly. Your piston rings could also contribute some flakes as well.
I think you got ripped on this deal. This vehicle had more than just bad maintenance, it was driven for a significant period of time without any oil pressure, that is probably why it was traded in.
You might be able to enforce your warrantee. I'm not a lawyer, and you probably have to hire one to do it, but if the warrantee was sold to you at time of purchase, then all preexisting conditions should be covered. To void the warrantee, they would have to prove that you caused the issue.
If you press the dealer that sold you the warrantee (that you should never have bought), you might get a full refund for this cost without going to court.
I would recommend that you consider a remanufactured long block. It won't be cheap, but in the long run, it could be your most economical alternative. It should be good for another 100k miles. Be sure to get the transmission checked out first though, if that is good and can be serviced (that is the fluid is not black at this time), then the reman engine should be worth it.