Too much too soon... as far as expectations, upon the child from the Parent.
My son, now 3.5 years old, potty trained himself as well, only recently. It was when HE was ready. He still cannot hold it for a long time, before actually reaching the toilet, but he is doing good and wants to. That is key.
We use a potty chair which we put near by, to make it more accessible.
He even take the potty insert and dumps it in the toilet, rinses it, then puts it back into his potty chair. All without my teaching him. He just does it on his own. We did not use rewards/treats/bribes. Just giving him praise and high-fives.
Once a child starts to "withhold" their poop, this is not a good sign. This is anxiety. They WILL get constipated... and this makes it worse, because it hurts, gets harder to come out, gets impacted internally, and so because it hurts, they will withhold pooping again. A vicious cycle.
This is per our Pediatric Gastroenterologist Specialist, which we had to see because my daughter went through that. He said, Toddlers COMMONLY go through this, once they are expected to potty train. Pooping... takes longer to master, in a toilet and for the emotional comfort with it. He said, NOT to force it or make it an issue nor to scold/punish for it. This will only make the constipation worse. Once on a vicious cycle of withholding poop and becoming "constipated"... it it then a biological AND emotional based issue. AND, at least for my Daughter, he said that is can take a minimum of 3 months... to overcome AND for the poop to become of normal consistency etc. We had to give my daughter prescribed things to alleviate her constipation and for her to stop "withholding" her poop, and to overcome the anxiety. We did not "force" my daughter's toilet training nor pooping... but the process can create anxiety in the child, regardless.
Potty training... is a process, over time. And, there will be relapses or regression... or accidents. All normal. They are so young... they will not be perfect. If a child thinks they have to be perfect, it will just give them hang-ups.
AND, night-time dryness or during naps... is a whole other process. It is biological and has to do with the myelin nerve development as well. Night-time dryness does not occur until even 7 years old. Normal per our Pediatrician.
Keep your expectations in line with your child's readiness.
Your son is only 2.5... and boys typically master pottying later.
All the best,
Susan