Are you talking removing the rail and rebedding or just putting a bead of caulk along the edge?? If it's the latter, you are just putting lipstick on a pig. I don't care what sealant you are using, it will eventually pull away and leak. There just isn't enough surface area to keep the sealant in place for the long haul.
If you are talking pulling the rail and redoing it, I would be sure all of the toe rail was covered in sealant before reinstalling. Any voids are places for water
to get in and corrode the aluminum
. It's going to be a god awful mess to re-install and clean up but would, hopefully, be the last time you'll have to think about it. I wouldn't use 4000 but might think about 4200 if there is a possibility you might want to remove the rail in the future. 5200 is touted as an adhesive
and has a reputation for not wanting to let go.
Personally, I'd use LifeCaulk or 3m 101 sealant. It's a Polysulfide rather than polyurethane
that I've had good luck with for the past 40 years. For me, it's easier to work with and remains pliant even after 30 or 40 years, personally verified. I've heard some rumors that 4200/5200 harden after many years.