As Lou alluded, he has a combined plan deduction limit on his "employer" (non-401)k) deferrals) of 31% of eligible pay - which is his net adjusted SE earnings minus those "employer" contributions limited to $330,000. This does not apply if the employer contribution to the DC plan does not exceed 6% of limited eligible pay, or $19,800 on $330,000. If $30,000 was his salary deferral and catchup, then the remaining $25,000 was profit sharing and exceeds that 6% mark. Therefore, 31% on $330,000 is a $102,300 maximum 2023 combined plan deduction.
Also as Lou stated, need to bring in an actuary, and sooner rather than later, someone who can map everything out and ensure compliance. This usually requires that any DC plan contributions other than 401(k) salary deferrals are determined last to ensure such profit sharing does not exceed 6% of eligible pay after all adjustments and deductions.
2023 is still possible but much more limited on the deduction ($77,300) than desired. He could accrue a larger benefit for 2023, just deduct the entire required contribution for 2023, carrying forward the excess for a 2024 deduction - but a knowledgeable actuary/actuarial firm should be consulted to map that out for your client. And 9/15/2024 is a drop dead date for funding 2023 and a lot of steps need to be completed before then so the process should be started early enough before then - like before Labor Day if not mid-August.