This kind of argument assumes that folk 2000 years ago thought about religion the same was as many 21st C atheists do. Heaven/hell are just evolutions of thought regarding the afterlife that developed further throughout the centuries. Why assume they were invented by people cynically trying to 'keep people in line'? Remember Early Christianity was not a religion of the powerful, but was somewhat subversive.
Early Christianity was popular among the disenfranchised, and the idea that the powerful and corrupt would get the comeuppance might well have been very appealing among those who had no ability to change the status quo. What's more, they got to be among the elect few, a mark of status they would be unlikely to achieve in the physical world.
Also, I'm not sure its history supports the idea that it made people think 'there's nothing people can or should do to change anything in this life' seeing as it has often had the exact opposite effect.
I wasn't referring specifically to early Christianity, but the general idea of hell and the idea of eternal punishment to people who fail to fall in line. Either hell exists or it doesn't. If it doesn't exist, then someone had to invent or contrive it.