A while back a publisher offered $500K+ for a deal. They had treated me like the scum of the earth when they published my first book, so I was not wildly keen. Everyone told me, yes, but the reason they treated you like the scum of the earth is that you had no agent. If you have an agent it won't be like that, they will have nice manners, you will get paid, it will be completely different. I hired an agent.I'm sorry you've had this experience. It's not the experience everyone has, but it's not a total anomaly, either.
What happened was, the agent and agency staff immediately jumped on the bandwagon and started treating me like the scum of the earth. The agent did haul ass into negotiations, yes, but neither the agent nor anyone else at the agency would do anything I actually asked them to do, and meanwhile, bizarrely, my editor seemed to think that having a power lunch with my agent constituted being nice to me. He could still stand me up for meetings we had arranged, because he had been nice to my agent.
At the time I hadn't spent much time online, knew nothing about nice deals, very nice deals, major deals, whatever. I had assumed that the deal must just be a crap deal. $500K+ seemed like a lot of money to me, but that was just my ignorance. The reason everyone was treating me like a piece of shit was that, by publishing standards, a deal for upwards of half a million dollars was crap. Much later, obviously, I found Publshers Marketplace and discovered that, um, K? Not only was this not a crap deal, this was, by publishing standards, the top deal for which they bother to have a category.
So what I wonder, obviously, is what a writer has to do not to be treated like a piece of shit. If a major deal is not enough, what does it take? Does an agent want a million-dollar deal to treat the client with professional courtesy? Two million? Three million? It would be nice to know.
The bottom line is: first, get an agent who will treat you the way you want to be treated. This is accomplished by (a) talking to the agent enough to get a sense of what kind of person the agent is and (b) asking for present clients of that agent who would be willing to talk to you about how they've been treated.
Bear in mind that the agent you have described is no doubt a terrific fit for some authors. What counts as "treating me like shit" to you is not the same for other people. Likewise, the agent who would be the right fit for you would be a bad fit for other authors. So when you talk to a prospective agent's other authors, ask specific questions that will give you a sense of how the agent will respond to the situations / issues that mean the most to you.
Once you have a good agent who is on the same page with you, that agent will be able to match you not only with publishing houses which will appreciate your work, but with specific editors who will treat you nicely.
It should be said that you may not be able to find an editor who (1) loves your work (2) treats you nicely and (3) can pay you that much money. Two out of three is as much as you can reasonably hope for.
If you get three out of three, keep your mouth shut about it; you'll only make other authors hate your guts.