That's normal.
Pooping... in a toilet, is often the last 'phase' of learning toileting.
Normal.
And yes, they hide.
They are self-conscious and because they know their parents do not want them to poop, except for in a toilet. But they are not yet, there yet. Not ready.
He is normal.
It can take a LONG time.
Potty mastery, takes time.
It is in increments.
Night time dryness, is also something that is entirely separate. Night time dryness or nap time dryness, does not occur, BIOLOGICALLY until even 7 years old. And this is normal. It is the physiological development of the body/brain/nerve connections. Not a child's age.
My daughter, when that age, developed constipation. And we then had to take her to a Specialist- a Pediatric Gastroenterologist. Because, she was then HOLDING in her poop on purpose. Hence, getting pain and not popping. This is called "withholding." We did not pressure her about it or about pottying... but she merely got stress and anxiety about pooping. The idea of it.
And, Once a child withholds their poop and gets constipated, it can take MONTHS for their bowels and poop, to normalize. And for them to get over the emotional aspect of it, and the biological aspect of it.
The Specialist said: to just let the child poop in a diaper. Once they are ready, they will get to that mastery of it. But, if they are like this, they are NOT ready.
You cannot make them ready.
It is an emotion and biological based.... occurrence.