TMP was never a flop. Not by a long shot. It made a boatload of money. In fact, until the Abramsverse films, it was the most financially successful of all the films when adjusted for inflation. TFF was the only one of the TOS cast films to lose money at the box office. It and Nemesis are the only certified bombs in the film series.
It wasn't, but much of the box office was existing demand that was lost by the movie's poor quality. Batman v. Superman and The Last Jedi had similar places in their own series.
(My mother was actually an example of this: having grown up watching TOS and TAS, she was so bored by The Motion Picture that she gave up on the franchise until my father, who had watched The Wrath of Khan, encouraged her to go see The Search for Spock—which is ultimately how I became a Star Trek fan.)