I'm going to elaborate more, I tried to be as vague as possible because I don't want the DM to see this and take it the wrong way (I actually think that they are a great DM and friend). This is a world where magic will get you arrested, so none of our party members opted for classes that use it, however two of the npc fighting did have magic. One was a healer and the other used Misty Step along with some type of blind spell. The Slave Trader kept the slaves in a necklace she was wearing, my PC could see/hear/sense? the slaves as she gloated. The party did in fact help in the encounter, however were not able to defeat the lead npc before my permadeath on turn 2 (all 8 attacks hit and rolled near max damage per the DM, I don't peak at the DM's rolls). In the end the party was able to steal the necklace. They fled out a nearby window into the ocean, presumably near land as hours earlier in game time we saw buildings on the shore. We were told the party made it to the shore with a level of exhaustion on each member. However, after the session the DM said we were in the middle of the ocean still and will each have to make 4 saving throws to make it to shore as we are half a mile away.

Multiple members of our party were upset at how the situation was handled (some vocal), and felt it was targeting/punishment. I also get the feeling the DM didn't read my backstory, because I made it very clear how against slavery my character was. He was written to be very nice and goofy, however his flaw was blind rage at the sight of mistreating his people.

The DM's response to the party's general unhappiness was that it's how the scenario would have played out realistically. I understand this for the most part, but I feel that my player was punished heavily for something he had to do via his story. I do not think I was in the "right" to attack the slave trader, however that's what my character would have done, all he really knows is violence (He was sold into slavery at an arena forced to fight very Conan style).

The experience as a whole has hurt my new character creation because of the setting (no magic or jailed) and obvious enforcement of stern ideals. I haven't responded to the DM, however in his responses to the party he made it clear that this is how the scenario will play out 10/10 times. Leading me to believe if I play a character that uses magic, I will 100% be taken out of the campaign.

Also, we had no indication of these NPC's power levels. Other than the fact that we knew the Leader was in fact a leader of some maybe pirates, and had a collection of blunderbusses (that my character was unaware of) we had no clue about weapons/magic.

And after reading the replies, I understand that death is/should be a possibility every combat. It was simply in the way I was insta-killed that feels bad.