Best way to prevent fin rot and other health problems-is to keep stress factors under control to support the immune response- by maintaining the water quality, proper stocking and good nutrition.
Using either aquarium salt or Epsom salt will not prevent fin rot.
With that said, using Epsom salt (magnesium sulfate) at low dose for plants or long term for chronic buoyancy problems IMO/E is safe. I use Epsom salt on occasion in my planted tanks and have kept Bettas with chronic buoyancy issues in Epsom salt for years without any issue.
Aquarium salt (sodium chloride) is a great product to use for the right reason, dosage and duration. Long term use with Betta can cause kidney damage, osmotic issues and resistant issues and not recommend to use long term.