São Paulo potential as a tool for calculating S factors of fusion reactions in dense stellar matter