You might see Starship Troopers as a cautionary tale, but it wasn’t intended as one. Heinlein wasn’t arguing against the world he was writing about, or the subjects being discussed by his characters, the book is generally regarded as a depiction of his political views.