I think maybe an easier example to consider would to be to put 'fuck' and 'shit' aside (since its even harder to understand how these were ever really taboo), and instead consider the older more religiously inspired curses like 'damn it', 'blood the mary', etc.
These curses (in certain circles) were hugely taboo because in the worldview of the times, they were deeply harmful to use on a metaphysical / spiritual level. You were doing real harm in the world by exclaiming "damn it to hell!" or telling someone "go to hell!".
This is perhaps hard for us in our current culture where even even amongst people who claim to be religious, almost everyone would just view those as empty words, but I do think there's a real case to be made that our ancestors would have understood such curses in a very similar way to the way we understand and treat slurs today.