I was reading a very interesting article not long ago, involving mice. The experimenter made a 'mouse paradise' and let the mouse population build unchecked, then studied what happened under extreme overcrowding conditions, though all the physical needs of the mice (food, cleanliness) were met.
In short, the majority of the mice went bat-poop crazy.
I've handled rats from severely overcrowded conditions, and I can tell you, they are severely mentally scarred. Everything's a competition, aggression is high (because that's how they are forced to communicate/survive) .. some of them were too far gone, I'm sad to say and were simply too much risk to be kept as pets (my ex-bf of the time once got on the wrong side of a large male and needed eight stitches.. ).
Give the ratty time, however. It's spent however long not only overcrowded but malnourished by the sound.. food will be a driving force, and territory defense. So deal with those first.
Don't give the rat a hidey space. This may sound mean.. after all, he deserves the best after what he's been through. But if he has nothing to defend (like a good private space where he hoard his foody preciouses..) he will become less likely to bite what he perceives as an intruder. Just for a month, if it doesn't help by then it's not going to.
Food - don't feed him through the bars. Put your hand in, give him a long carrot stick or something else tasty that will lessen the risk of him biting while he grabs it. Hold onto it, after he takes it. Don't let him run off with it. He has to eat it there, with you holding it. A month of that might lower his food aggression as he learns you are not the competition.
You might also consider having him castrated, but my feeling here is that his behaviour is trauma related. If he starts having testosterone aggression as well.. you're in for a real time of it. He may already be winding up to it, if he's 6-12 months old. Consider this a second last option, but a very real one that could save his life (or you a pile of stitches).
In those nicer moments where he does allow you to handle him, keep it minimal. Pet his head between the eyes, don't go near his 'tetchy spots' (some rats have them, if they haven't been handled..). Give him a bit of pleasant contact -- then withdraw, way before he gets aggressive. Do that a lot, and you should see some improvement.
I'm sad to say this, but if he does continue biting and in a few months you feel there's absolutely nothing more you can do to help him stop, you might have to consider putting him to sleep. He will never be a safe pet, and will live his life behind bars because handling him will always be a nightmare.
That's worst case scenario, however. I have gentled rats that I honestly thought were hopeless cases.. bred badly, came from horrible places.. a little patience and kindness can go a very long way.
Good luck!