S-Corp Election for Electrical Contractors: Salary vs. Distribution Math

How the S-corp salary and distribution split actually works for electrical contractors in Texas, what the IRS means by reasonable compensation, and when the election is worth it.