I honestly can't believe you can a Star Wars movie being niche, well maybe if it was a touring film about the Cantina band
For the main Episodes, I entirely agree with you. But this is a spin-off, made very clear by the title (I do sometimes wonder if it might have done even better if they'd called it "Star Wars: Rogue One", rather than the other way round). Having Star Wars in the name doesn't mean it's not niche, like all the massive amount of TV shows, books and video games that are also Star Wars but are similarly niche.
As for the knowing the ending, well a fair few people I spoke to were surprised by it.
In terms of the fate of the characters, yeah that was less obvious though still quite a lot of people I think correctly guessed/assumed where it would go. But in terms of overall plot, we know they succeed because that's exactly how the original film starts.
Also knowing the ending didn't really effect Titanic's BO!
Indeed, and personally I think that film massively punched above its weight.