You need to clean out your cat’s litterbox frequently enough that he doesn’t find himself a different “bathroom.” What’s frequently enough?
For regular poop scooping, twice-a-day surveillance is a better bet than once. If you have multiple cats, you may want to scoop at least three times a day, even if you have one more litterbox than the number of cats in your home. Sometimes cats decide they all want to use the same box.
Develop a schedule that becomes a habit. In other words, don’t simply tell yourself that you’ll check twice daily or wait till you happen to walk by the box. Make the rounds at 8 am and 8 pm, or whatever times work best for you. Of course, if you happen to notice something to scoop between times, go ahead and dispose of it. But stick with the schedule regardless to make sure your cat’s penchant for cleanliness is being met.
And make sure to empty the litterbox and wash it once a week. That, too, should be automatic rather than tended to haphazardly.