In BB, if he had formulated the antidote without Fox's help, Rachel would have died at the hands of Crane in the Asylum long before TDK. Remember, he got gassed himself, and only regained consciousness with Fox's antidote. Right after that, Rachel runs off to confront Crane and he had to follow her, only hours later. I don't see the timeframe where he could have worked on an antidote. I don't even see how he would have recovered in the first place.
And if he took the time to invent the sonar tech in TDK, the Joker most likely would have killed ten times the amount of people he did, he was intent on killing people every night. It's not like these things were happening while Bruce was on vacation, he was running around the city, down in the trenches trying to thwart numerous attempts by the mob & then the Joker to murder & cause destruction city-wide, while Fox has the time, and resources, to develop these devices. I don't see what the problem is?