I gather Stephen's machinations are him living through his wife (hence why he's led us to believe he wrote the book).
It's not real.
If it's reflective of the book's narrative (and not reality), then him acting as a cartoonish villian, out to destroy the Ravenscroft family, is really the mind of his wife, as we're never led to believe he is of that sort of mentality, but we know she is.