My suggestion after potty training 2 girls (one in the last 6 months). It can be such a frustrating time when you know they are ready and they show that but then mentally they stop! I have had that with both children and it is hard. One thing I did learn, don't give punishments for not going on the toilet! My oldest daughter also struggled with the BM on the toilet. When I finally said, "fine, you will be in a diaper than"...after about 3 weeks of going back to diapers...she was miraculously cured. It was so frustrating, so I understand where you are coming from!
Give him motivation to go to the toilet..and don't sit in the bathroom for hours with him...it won't help you or him. If he goes on his own...praise him lots! Maybe even offer daily "treats" of an m&m or dum, dum suckers. We did the suckers each time after they went potty. Slowly we were able to phase them out.
Children have a hard time seeing far in the future, however, seeing right now I get this sucker if I go on the toilet...now that becomes incentive! Each time he goes to the bathroom give him 1 M&M...if he has a BM in there, give him a sucker and an M&M. That way you are encouraging both BM and #1 in the toilet. A couple M&M's a day won't hurt him for a few weeks. I was able to get both children off the rewards within about 4 weeks.