Okay... when my daughter was that age and 'wanted' to toilet train, we started. But, pooping... is always the harder part of the process.
Ended up, just from pure stress and anxiety about pooping.. she got constipated and pain etc.
We then had to take her to a Pediatric Gastroenterologist. HE said... that everyday, he sees toddlers like this. He said, do NOT force a toddler to poop in a toilet... until they are ready. If constipation then occurs... it is hard to remedy. Because... this kind of constipation is 2-fold: it is a medical problem and then it is an emotion based problem. Because... the more constipated a child gets... it can cause complications/bulging bowels/Encopresis/blockage etc. AND then when a child is constipated... it causes pain. Because of the pain... a child will then "withhold" their poop.. .and may not go, at all. Which then exacerbates the constipation problem, making it worse...and making the pain worse, internally. So then, the child withholds their poop, more. Thus, a vicious cycle ensues.
For my daughter, it took 3 months to undo her constipation... and the psychological 'pain' it causes.... and we had to do, per the Doctor, prescription based remedies.
The main thing is: he said, do not make a child constipated... just because you want them so badly, to BE potty trained. A child's bowels and 'mastery' of it, does not work that way. In the meantime, let the child poop in a diaper. Until they have attained a sense of readiness, for pooping in a toilet..... without stress/pressure/anxiety.
The Specialist we went to, also said, do NOT use suppositories or enemas in a child.
In tandem with the oral things we had to give our daughter, he also suggested pear juice, or whole unfiltered apple juice etc. To soften the stool.
all the best,
Susan