Since you've asked for advice, I'll see if I can help. First, remove all the old sealant. I use MEK. It works very well for removing anything that isn't metal. It is a bit hazardous, so use proper PPE. I don't recommend you use any of the foam gasket that AS used originally. I would use some butyl putty tape that is the width of the battery box mounting flange. You should use a good polyurethane sealant like Trempro 636, 3M 540, Sonolast NP1 or Sikka 221. There is some good reading on sealants
here.