J.J.
hi J.;
i'm not sure what the big problem is. it's just baby poop, and it's in the easiest place possible to clean! my daughter does it all the time and she's 17 months. she's also been doing it since about a year.
you could try;
figuring out what time of day this happens; if it's the after dinner bed time bath, hold off on the bath for a while till he's had a chance to poop in his diaper. it might mean he goes to bed half an hour later but if you're that freaked out by it, maybe it's worth it.
or just fill the tub a tiny bit, like 3 inches, don't put any toys in yet, wait till he poops, clean it, then refill the tub for the fun part of the bath.
when my daughter does this, if there's already toys in the bath, i just fish them out quickly and throw them into a large pot of boiling water for five minutes. we have lots of bath toys so she doesn't obviously have to wait for more till these are clean. i clean the tub quickly with baby soap and start again. remember, it's just baby poop, it's very clean stuff.
at 1 year old, pretty much NOTHING is behavioral in the way that you're thinking; in other words, some kind of aggressive or wacky habit. it's just natural. and the bath relaxes thier muscles, so they pretty much can't help it. the reason potty training on very young babies doesn't work is exactly that; they simply don't have the muscle control or the language comprehension.
and BTW my 3 yr old son never ever pooped in the tub even once and he also, like my daughter, started using the tub as a pool without a safety seat, but with supervision of course, very early, and loved a llong bath, and it was and remains instrumental in a good bedtime routine. all of which is by way of saying, the tub poop is random, normal, NOT the result of anything you or your son is doing wrong, and, it's not correctable, so you might as well let it go.
to which i would in closing add this; try to liberate yourself from phrases like "it has to stop." this kind of resistive, controlling thinking is unrealistic and will only make you and your child frustrated and unhappy. tiny children like yours and mine don't have control and they don't have motives. they are just natural and beautiful and they really love us with thier whole hearts, nothing that they do, NOTHING, is about hurting us. save your energy, it's going to get a lot tougher in another year or two.
good luck and try to relax,
J.