In sum, we are not to harm animals. But there seems to be a history of people neutering edible animals with the expectation that their meat will thus become tastier. Muslim scholars have tended to accept this, probably due to it being widely acknowledged to be beneficial to humans and not harmful to the animals who are in any case being reared for food. According to some Muslim scholars, there is some scope for neutering animals to curb their population growth if it seems that this will be beneficial to the animal population. Some Muslim scholars are hesitant about this, as they see this as a human attempt to play God. However, it seems that this is a matter that one will have to use some personal judgement about, especially given one's personal circumstances, and one's realistic expectation about how the potential kittens will be cared for.
This is one of those things in Islam in which one cannot find a hard and fast rule that all scholars will agree on. Moreover, it shows how scholars can be swayed by realities on the ground, such as the idea that the meat becomes tastier in castrated animals. Widespread ideas and practices tend to be accommodated in Islamic rulings unless there is a higher level consideration such as a clear text in the Quran or the Hadith on the subject.