So get independent advice, get people to read you right from the start. Even these procedures may not be failsafe. Once, when I had followed my own advice to the letter, my project was still dumped in an unpleasant, long-drawn out and agonising way. Fortunately I had the reflex to ask for more money in compensation, but the improved bank balance in no way made up the painful experience and the loss of future earnings. But at the very least, I had the satisfaction of knowing that I had done what I could.
Good publishers do exist.
I have, on the whole, been extremely lucky and had the opportunity of doing interesting projects with wonderful people who have pushed me to places and depths and in directions I wouldn't have gone by myself. Most of my relationships have been constructive, based on honesty, transparency and mutual respect. But I have had my fair share of publishers' jilts. Some of these, at least the first ones, appear with hindsight to have been my own fault. I didn't know anything.