Hello and thank you for using Just Answer,It appears you are asking if your salary could be reduced and that count as a payback of the loan. This would not be allowed as the salary would still be subject to all withholding and taxes (for employee as well as S corp).IRC section 1366 mandates that the shareholder report all income from the S corporation in the same manner as it is earned by the corporation.
Repayment of any loan from the shareholder to the S corp would not reduce the wages of the shareholder (employee).
If I have not interpreted your intentions please let me know before you rate. If I have, I thank you in advance for a positive rating.