Slaves didn’t build the monuments of Egypt. Religion was a factor in their construction. Work on the project—get eternal life in the world over the sun. Work on the pyramids also got you a tax deduction, best medical care on planet Earth at the time and all the Beer, meat, and food you could drink. I believe it accidentally caused Egyptians to think of themselves as one people rather than a collection of villages—a form of nationalism. The real wonder is in the organization of the manpower. Still many mysteries linked to Ancient Egypt.
Read this book!
https://www.amazon.com/gp/product/0500052115/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1