Tony Schwartz’s former editor has a nickname for him. “He’s Dr Frankenstein,” was how Edward Kosner put it in the New Yorker.

In fairness, there have been many Dr Frankensteins behind the rise and rampage of Donald Trump. They’ve included the Republican party, with its years of divisiveness and racially charged rhetoric; the media, with its collective chase of the next shiny object; and the baby boomers feeling the cultural and economic ground give way.

But it was Schwartz who sparked this strange political creature into life. As the ghostwriter of Trump’s bestselling 1987 book The Art of the Deal, he did more than anyone to create the businessman’s public persona. In it he translated Trump’s coarse ramblings into charming straight talk and came up with the phrase “truthful hyperbole”, which captures brilliantly an approach to business and politics in which everything is the greatest, the most beautiful. Schwartz helped give Trump the sweet smell of success – now seemingly irresistible to millions of people clinging to the American dream.

“It’s been horrifying,” he says. “In the nearly 30 years after the book was published, the main thing I felt was, I want to be as far away from this man as I can, but I didn’t feel I created Frankenstein, because he was a real estate developer and reality television star. Who cared? It wasn’t that consequential to the world.”

But building on the foundation of The Art of the Deal, Trump spent a decade hosting the reality TV show The Apprentice, reinforcing his image as a preternatural businessman with the power to say “You’re fired!” (and blurring the boundaries between reality and reality television, just as he would throughout the presidential campaign). Many supporters say they trust him to run America like a company; the business of America is business. It was no coincidence that he launched his presidential campaign at Trump Tower, a marbled cathedral of capitalism in Manhattan.

He is a man who is a chameleon and doesn’t have any core beliefs beyond his own aggrandisement and power

Schwartz, 64, continues: “I simply didn’t think that much about it until he decided to run for president and it became clear that this wasn’t going to just fade away, that he was actually in a position to win the nomination. That’s when I thought, ‘Oh my God, I’ve contributed to creating the public image of the man who is sociopathic and people don’t realise it.’”

If he were writing The Art of the Deal today, he’d call it “The Sociopath” instead, Schwartz told the New Yorker in July, an interview that broke decades of silence on the matter. “I certainly felt a kind of moral imperative to step in and say what I knew about a man I considered to be so dangerous, and I am very relieved that I did.”

The Trump he observed was vulgar and vainglorious, a narcissistic liar with a short attention span, no appetite for reading books and an “extremely mixed” business record. A Trump presidency could, he warns, lead to martial law, the end of press freedom and the risk of nuclear war: “Staggeringly dangerous. Worse than I imagined when he began to run. Unthinkable. Horrifying. He’s way more out of control in the last couple of months than I’ve ever seen him. He doesn’t have any core beliefs beyond his own aggrandisement and power.”

Tony Schwartz, left, with Ivana Trump, photographer Francesco Scavullo, and Donald Trump at the book party for The Art of the Deal at Trump Tower, in December 1987. Photograph: Sonia Moskowitz/Getty Images

Schwartz fell into writing the book almost by accident. A liberal journalist in Ronald Reagan’s America, he wrote a scathing magazine article on Trump, only to receive a note from the entrepreneur, ever greedy for attention, saying he liked it. When Schwartz went to interview him for Playboy, Trump said he wanted to write an autobiography, even though he was only 38. Schwartz suggested instead a book called The Art of the Deal. Trump agreed – and said he should write it.

With a high mortgage and a second child on the way, Schwartz needed the money. He struck his own deal: a joint byline, half of the $500,000 advance and half the royalties. It paid off in financial if not spiritual terms: The Art of the Deal sold more than a million copies and spent 13 weeks atop the New York Times bestseller list.

Even at the time, Schwartz felt he was selling out, but to say he feels regret alone would be too simple. “I’ve spent a long, long time thinking about why I did it,” he muses. “It wasn’t the only choice I made that I’m not proud of in my life. It’s a complicated question to say whether I would do it differently today and here’s why: if I knew everything I know about what would happen to Trump, of course I wouldn’t do it.

“But the complexity is that the experience of writing that book was so powerful, in a negative way, that it led me to change my life dramatically and move from a focus on being successful and earning more money to really exploring what a meaningful life looks like.”

Schwartz quit journalism and set up a consulting firm, The Energy Project, which aims to boost employees’ productivity with happier, healthier workplaces. “I’ve spent 30 years doing stuff I’m proud of, that I’m not sure I would have gotten to if I hadn’t written that book. It gave me such a profound experience of the wrongness the direction of my life was taking. So it’s complicated, right?

“One does good things and bad things over the course of a life and, if you get to the age I am and feel good about the life you’ve lived, it’s hard to say, ‘Gee, I wish I’d done this differently or that differently.’ Maybe I wouldn’t have landed where I did.”

Schwartz delivered an address to the Oxford Union in the UK last Friday with the title “Into the belly of the beast: how Donald Trump led me on the path to dharma [enlightenment]”. He says: “What are the consequences of the choices you make that you rationalise to yourself, but can little imagine potentially huge consequences?”

It remains to be seen who else will find a moment of zen after election day on 8 November. Probably not the Republicans, facing bitter infighting after Trump’s hostile takeover. It will also be a time for the media to look at itself closely. Last December, the Republican candidate Jeb Bush told press reporters: “He’s playing you guys like a fiddle … by saying outrageous things and garnering attention.”

In February, Les Moonves, chairman of TV network CBS, declared: “It may not be good for America, but it’s damn good for CBS.” By March Trump was already estimated to have earned $2bn of media attention. There will be hard questions over the thousands of hours of airtime he has been given – and whether his bigotry should have been called out sooner, rather than normalised and mainstreamed.

I was a reporter for many years. You’re driven by the story … To write about Hillary’s policies just isn’t as sexy

While TV has often been in thrall to Trump, newspapers have shown their mettle with a series of investigations and exposures. The New York Times obtained records showing the billionaire may not have paid tax for 18 years. Then the Washington Post revealed a 2005 video in which Trump bragged about groping women (something Schwartz says he did not witness in 18 months shadowing him). This opened the floodgates for a dozen women to come forward with allegations of sexual assault or unwanted advances.

Schwartz reflects: “I think my journey has a parallel in the journey of the media over the past six to 12 months. Along comes something that seems pretty damn seductive, a guy who attracts huge ratings and you know that people are going to read your story if you write about him.

“I think the best people in the media have come to see that rationalising hate without considering the consequences of giving him that much attention turns out to have potentially really damaging, long-term consequences.”

After this most astounding of all elections, nothing will be quite the same again, he believes. “It’s going to change the media because there’s no way not to go through a period of self-examination. It’s true for the media, for politics, for the culture of this country and for the whole issue of polarisation. Assuming it ends without Trump being elected, we have to use this as an opportunity to question a lot of assumptions that vast numbers of people had accepted and he has proved are not true.”

If Trump does lose the election, as opinion polls strongly suggest, there will tremendous relief for Schwartz. “This is an inflection point and if he’s as soundly rejected as it looks like he will be, it’ll be quite a contrast, for example, to Brexit. It will suggest the forces of progress and evolution hurled away the forces of hatred and fear.”

But how would Trump, whose entire personal mythology is based on winning with swagger, react to the devastating loss? Schwartz knows it won’t be pretty. “You can tell he’s terrified and angry about it and bewildered by it. It’s hard to predict exactly how he’s going to respond. It won’t be in a healthy way.

“There’s a chance he’s going to do everything he can to blame this on someone other than himself. To insist it’s a rigged election and to try to mobilise the angry people who are his base to do something violent and crazy, which he can then blame on the next administration. I’m very concerned.”