For me, the first repair was on the inside of the frame rails at the "dogleg" where the frame kicks up from the cab to under the bed.
Welding on a couple strips of 1" wide x 3/16" thick stock got it past inspection for that year.
Two years later there were holes opening up around the previous repairs. Ground the stock back off and cut some 3/16" plates to cover things up.
Another year and I had some new holes opening up. Ground the previous repairs off and took a needle scaler to the frame rails to see how bad things were. Ended up with half a five gallon bucket full of rust flakes, larger pieces, and accumulated debris. The scary thing was that there was now a hole in the frame rail under the passenger side door that was over half the height of the frame rail and over a foot long...
There had been very minimal signs of there even being a problem there when I started.
I cut plates to cover everything up to get it past inspection, but started building the frame after that.
What I had found was that there was a lot of dirt and debris inside the frame rails. This just trapped moisture in there. With the salt they put on the roads in the winter around here, I'm sure that was collecting in there as well. All of that causes it to rust from the inside out. There were places where the undercoating on the exterior was about all that was left.
If, from new, you made a point of flushing out the debris from the frame rails and regularly coating it inside the rails with some sort of creeping oil undercoating, you might stand a chance of preventing this. But I really feel that once you notice rust-through, it's the beginning of the end.