Soil ph, how fertile it is, matters a lot, cant explain you in terms since i am just a hobbyist gardener (maybe someone else will). Rarely watering and lot of sun with no shade stress the plant and (apparently) increase the heat.
I've read some time ago someone's experience (i presume i've read here, i dont remember) and he claimed his plants - shade during lunch, proper watering - gave a decent amount of peppers, but the heat was mild. His brother had same type of plants, different location, full sun, watering whenever he remembered and the peppers were smaller, but more in number and very hot.
Oh and i plant basil between peppers, i've read it increases the flavor. And some personal experience in the photo, Scotch bonnet planted in the garden vs planted in a pot. I have to say i didnt feed it since i dont "feed" my plants. We put compost in the garden during winter and that's all the "feed" anything gets. I dont agree with weird bottled "natural" feed stuff.