"The Man in the Iron Mask" was originally a historical fiction novel, without any pretense to accuracy. But you are right, Louis XIV was a terrible ruler.