Does the historical context (time and place) excuse the more misogynistic opinions of a "morally perfect" deity? The saying goes, "God is the same yesterday, today, and tomorrow." If this is true then surely god's moral decrees should not be affected by something as arbitrary as time or location.
Since the text is the work of a man no. But if you are going to make up justification for anything, then that works just as well as saying you read it on the bathroom wall.
One of the main reasons that the buybull is so obviously man=made is that there are so many mistakes and contradictions. Surely an all-knowing deity would be able to write something that was timeless?
Religious texts were written almost 2000 years ago for a particular culture in a particular time. If you consider how many poor decisions are made in society today, and assume those int eh past with less knowledge available were even worse, then they have very little real validity, if any, in today's world.
Without calling in any deities, and just looking at the OT ( where all the slavery and beheading and stuff is) as a book, with an assortment of authors, editors, and redactors, you can discern an arc of progress. We start with murders and genocides and and eventually wind up at "Nation shall not lift up sword against nation, neither shall men learn war anymore." Humanity's evil is exposed and tamed in order to survive in a settled environment. The message is that people can progress. But hey, that's just me.
I've noticed that when I bring up the more controversial parts of religious text (ex. slavery, general misogyny, condemnation of gays etc) the most popular answer I get from religious folks is, "that was a different time." Or some iteration of that. These are usually the same religious folks who would argue that god is infallible and therefore never changes his mind. How can both be true?
To them both are true because they need them to be. The fragility of the human ego has always been behind these sorts of justifications. Much like conspiracy theorists, if you push they will push back and the regress further as trying to relay the truth or logic, no matter how solid or sound, only has the opposite effect driving them further into their misconceptions of reality. To answer your question, no, time and location do not justify heinous acts but also, typically, giving the full context paints them in an even worse light. For example I brought up Deuteronomy 20:10-14 to someone who said the Christian god is one of peace unlike other religions. I quoted the line, "When the LORD your God hands it over to you, kill every man in the town." Of course they said I took it out of context so I provided the rest of it: "As you approach a town to attack it, first offer its people terms for peace. If they accept your terms and open the gates to you, then all the people inside will serve you in forced labor. But if they refuse to make peace and prepare to fight, you must attack the town. When the LORD your God hands it over to you, kill every man in the town. But you may keep for yourselves all the women, children, livestock, and other plunder. You may enjoy the spoils of your enemies that the LORD your God has given you." They then followed with it being the Old Testament and that it is not to be taken literally. So I gave them a few minutes before responding so they forget I am trying to bait them into a trap and then asked if he believed in the biblical account of creation to which he replied he did so I reminded him of his previous comment about the Old Testament and how the creation story is the first damn chapter... To my surprise at the time he went ham and and started flipping out and cussing, calling me a devil worshiper and blah blah blah. In time since his religious fervor has only increased and immediately following our interaction he began posting religious crap no less than 7 times a day as compared to his once every couple days before our conversation.