Is it true that the Human Torch was replaced in the 1978 Fantastic Four cartoon show because the network was afraid that kids would imitate him and set themselves on fire?

No.  In 1977, Marvel made a deal that licensed a number of their characters to Universal Studios to be developed as live-action TV-movies and potential series.  The Incredible Hulk TV show (the one with Bill Bixby and Lou Ferrigno) came out of that deal, as did TV-movie/pilots of Dr. Strange and Captain America that never became regular series.  The Human Torch was one of the characters that Universal wanted to develop, and a teleplay was written but never produced.

This meant that, the following year when NBC wanted to buy a new, animated Fantastic Four series, the rights to the Torch were encumbered.  Universal — which was not to be involved in the cartoon show — would not make a deal that would allow the Torch to be included.  Therefore, he was replaced by a robot named H.E.R.B.I.E., conceived and named by Stan Lee and designed by Jack Kirby.

The rumor that is asked about above was abetted by a few statements from folks who worked on Marvel animated projects, saying that the Torch was omitted for the cited reason.  Either they had short memories or figured there was some P.R. benefit to claiming that.  And, of course, it's theoretically possible that had they not had to make the switch, there would have been some objection to the Torch.  But it never came to that.

And it is perhaps worth noting that the Fantastic Four cartoon series in question was produced out of the DePatie-Freleng studio on Van Nuys Boulevard in Van Nuys, California…a building that burned to the ground a year or so later.   Make your own connection.