The best solution is to add a dig-out guard to your fence or dog run:
Head to the home improvement store and pick up some galvanized sheet metal about 2 feet wide (corrugated or straight is fine; the stuff they use for roofing and sheathing outbuildings is perfect)
With snips, a hacksaw or a Sawzall, cut the metal to workable lengths, maybe 3-4'. If it's corrugated, you want the curves to be perpendicular to the long dimension of each piece, so that when it goes into the ground the curves are vertical. You may, for appearances, paint the "top" edge of the metal a pleasing color of oil-based enamel; then it just looks like edging. But, being galvanized, the metal will be weather-resistant.
Use a shovel (as straight-bladed as possible) to cut down through the topsoil at least a foot and a half (or as deep as possible) along the line of the chain-link fence. You shouldn't have to really dig much; just push down and then wiggle the shovel to widen the cut.
With a block of wood and a rubber mallet, pound the sheet metal down into the cut you made until there's about 6" of the sheet metal remaining above ground. Press any loose earth/grass down firmly against the sheet metal on both sides. Repeat around the entire length of the fence.
With a drill and a metal-cutting bit, drill two holes a couple inches down from the top of the metal and on opposite sides of your chain links, at regular intervals along each piece and where two pieces meet (each set of holes should probably be no more than the width of your dog's shoulders or the maximum diameter of his body).
With linesman's pliers, cut a length of annealed wire, pass it through the holes from the inside of the fenced area, then twist it into place around a chain-link wire on the outside (bored dogs will chew, and you don't want them chewing on metal wire).
Annealed wire will rust over a period of years if given the opportunity (the idea is usually that it's cheap to replace); you can mitigate this with a shot of clear acrylic or polyurethane spray, or you can just keep an eye on the wires and replace them. They do make galvanized wire specifically for use with chain-link, but it's stiffer stuff for a given gauge and so is harder to work with.
You now have an anchored piece of metal that the dog will have to dig more than a foot down to get under (or will hit impenetrable rock before he gets there), that is attached firmly to the chain-link so the dog won't be able to squeeze between them. This should be far more effective than your tent stakes at preventing him getting under the fence.
I think the answer depends on what "pretty mushed" means. And before you read on, here's a caveat: my sole experience with chain link fences is taking them down, not putting them up (but I've taken down quite a few :-)).
That said, my experience is that the links will collapse in on one another, not actually bend. Which means that the fencing as a whole can be straightened out again. Also, even though the posts appear untouched, you should ensure that they're plumb.
The rails are easy to replace; every home center should carry them, as well as the caps and other accessories. The important piece that you'll need is a coupling: a short section of pipe that fits snugly over the ends of two existing pieces, to join them together (in the fences that I've disassembled, this is just press fit, not welded or brazed, but I suspect a dab of epoxy would help).
Cut the existing rails with a reciprocating saw, close to the existing rails that still have caps (you could also use a hacksaw; you won't be able to get enough clearance to use a pipe cutter). Slide the new section(s) of rail through the caps, attach them to the posts, cut to length, and slide the coupling in place.
That just leaves re-attaching the fencing. I think that you can stretch it to the rail using baling wire and a pair of pliers: loop the wire through fence and rail, and twist it to take up all slack. Then attach normally.
Best Answer
I would get posts for a six foot fence to compensate for the wall height. Then anchor the posts in the ground. Then set the fence height to be level with the cap. If they didn't fill the blocks, the caps aren't thick enough to get a good length of anchor in.