Excellent question. There’s a lot we don’t know about Dornish law, but we can look at Gaemon Palehair’s edicts as a bit of a guideline – poor relief, pensions for former soldiers, a ban on wife-beating. The WOAIF also suggests that the Dornish have different customs on bastardy and homosexuality as well.
In terms of why that was good enough, I think you can find the answer in the sheer level of punishment Dorne absorbed. The First Dornish War burned every castle in Dorne but Sunspear, leaving the country “a blighted, burning ruin.” While we know a lot more about Dareon’s casualties than those of who he fought against, the combination of his crushing victories and Lord Tyrell’s reprisals against the civilian population suggests that this war was incredibly bloody.
My interpretation of the whole 50,000 spears vs. 25,000 spears is that the various wars had an impact on Dorne’s male population similar to what WWI had on France, which would have an impact on Dorne’s fertility going forward.
I think the Dornish agreed to the peace because the alternative would have bled their country dry.