Put him back in
diapers, not pull-ups that wick moisture away, making being wet less uncomfortable.
Stop all attempts to toilet train. In a week or so, put a clear glass bowl with age-approprite, safe small items in it on top of the fridge. Say nothing. When he asks what they're for, casually say, "Oh, they're for when you choose to pee or poop in the toilet." When he does so, let him choose one reward.