They know in the same sense that they know where to go for warmth, for water, or for shelter (hide). A gravid female getting closer to her lay date will find a spot she's most comfortable in to lay her eggs. If you go to the trouble of making a nest box for her, she would likely use it. An exception to the rule would be stressed or first time moms who wind up laying eggs all over the enclosure or laying their clutch in a pile and avoiding it altogether as if they didn't know what was happening or didn't want to have anything to do with it.
Balls aren't typically spending all their time roaming the wilds of Africa, either. They are ambush predators and spend the majority of their time in abandoned burrows or dens that may provide even less space than the tubs we use in racks. The biggest difference I see between those in the wild and those living in captivity is that our snakes don't have to travel far to find water or safe basking sites. All of it is readily provided for them and most captive born animals are accustomed to our human intrusion. There are currently 6 adult female ball pythons in my collection and 3 sub-adult females. All of them are very relaxed when we are working around them in their tubs. All of our snakes are pets first and foremost and they all get handled on a regular basis. They do have a tendency to become much more defensive once eggs are in the equation, but they are very lax with me checking in on them. I would not keep a snake that was openly aggressive. I understand if you have a much larger collection it may not be easy to keep tabs on individual animals and it may be more difficult to learn that particular animal's quirks and attitude. For us, we make it a point to do so.
Ball pythons are notorious for going through periods of fasting so a skipped meal here or there isn't an issue and several skipped meals while gravid is to be expected but a brooding mom can and will eat if you offer her meals. She'll gain weight and can be ready to go again the following season.
If you have good luck and good odds using artificial incubation methods that's great. I have had good luck and odds with maternal incubation and I have no reason to invest in or build additional incubators and incubation media to simulate what I'm already doing. I do have an incubator that could be used as a Plan B should a mother neglect or abandon her clutch but I have not had to use it for any of my ball clutches.