Surpisingly ...
Child Support for Illegitimate Child
In general, the biological father of the child is not obligated to pay for the child support. However, the father is not barred to enter into an agreement on child support payment with the mother of the child, and such agreement is enforceable once it is registered with the district office.
https://www.siam-legal.com/legal_services/Child-Support-in-Thailand.php
So he would be better off (financially) keeping the wife and child, and dumping the gik.