In thinking about this question, the first thing to do is to remember what this poem is about. Kipling is writing this poem on the occasion of the United States becoming an imperial power. The US is taking the Philippines after the Spanish-American War and Kipling is warning them of what they are in for. He is using his interpretation of the British imperial experience to tell the US what to expect. Everything that he tells them to expect is bad.
By the end of the third stanza, Kipling has warned the US that they are going to have to work hard. He tells them that they are about to
Go bind your sons to exile
To serve your captives' need;
He goes on to tell them that they will do many things to help their new subjects. The hard work will truly improve the lot of the people they dominate. The Americans will
Fill full the mouth of Famine
And bid the sickness cease;
But, he says, it is all going to be for nothing. That is because the people they are trying to help are lazy and foolish. “Sloth” means “laziness.” “Folly” means “foolishness. He is telling the Americans that the Filipinos will wreck everything by being lazy and foolish. The US will work hard and they will think that they are succeeding, but, at some point, the Filipinos are going to ruin things because they are “heathen,” which in this case is being used to mean “uncivilized.”
So, Kipling is saying in this stanza that the US is going to have to sit there and watch as the Filipinos’ uncivilized, lazy, and foolish ways end up ruining what they US has worked hard to build.