A few things to consider:
Elective deferrals are not counted in determining the maximum deductible amount.
The 25% maximum deductible limit applies only to employer contributions (e.g., profit sharing, match...) and is calculated based on total compensation of all eligible participants. This is not a limit on any individual participant.
The maximum deferral for 2024 was $23,000 and for 2025 is $23,500. It the participant is over age 50, catch up contribution limit is $7,500 for each year.
If, for example, the employee has W-2 of $25,000 for 2024 and defers $23,000 for 2024, then the employee's net taxable amount for 2024 is $2,000. Since the employee total annual additions in this case is 100% of pay, then the employee could receive an employer contribution of $2,000 and this would not affect the employee's W-2 compensation of $25,000 nor the employee's net taxable compensation of $2,000.
The calculations are the same for 2025 after adjusting the numbers for the deferral limit to $23,500.
If the employee is the only eligible participant in the plan, the employer deductible limit is 25% of $25,000 (unreduced for deferrals) which is $6,250.