Livestock will favour legumes over something taller with more cellulouse to digest. So instead of planting just one kind of plant on the sidewalks, might I suggest you plant two kinds at least. First, something tough and not very delicious like Mondo grass or agapanthus in the background. Then, sprinkled in the foreground, clover or soft grass (e.g. couch) in the foreground.
The animals might be tempted to nibble the background plant if they were desperate but hopefully that never happens due to the presence of the foreground plant. That way passing livestock will almost certainly let the background plants become well established even if they do damage the foreground plant. And once established, occasional munching won't hurt them.
In the ideal world, at some point an equilibrium would form so that the clover grows fast enough to supply passing livestock and the background plant maintains its place more or less left alone.
Disclaimer: I have no idea how suitable the above mentioned plants are for a monsoonal climate, but with some local advice you could adjust the species according to the general concept.