To stop raccoons from pooping in your yard wet down the area where they're pooping and keep it really wet in the area and eventually they will stop pooping in the area.
You can use an ultrasonic raccoon repel device to keep the raccoons out of your yard.
You can also buy and install a motion activated sprinkler that will spray the raccoons and other pests with water when they get near it.
The raccoons hate the water and will run off and not come back.
You can buy chemical repellents as well and put it in the areas where the raccoons are pooping and it will keep them away from the area.