Although, to be fair, court costs and filing fees are a drop in the bucket IF THEY DON"T FIGHT OVER STUPID THINGS.
The real cost issues:
1. Attorney fees. As you've said - the more the agree on, the lower the total cost will be.
2. Court costs only start to escalate if they have a bunch of hearings. In our case, we never had a single hearing in front of the judge, so this cost was minimal. If the parties can't agree on things, this could, of course, be stratospheric.
3. Outside services. We spent $2500 on a custody evaluator - which was very reasonable in any event and actually saved us many times that in court time. Our mediator was another $3 or 4 K. Again, the more the parties agree to in advance, the lower these amounts will be (in some cases, even zero).
4. One that's often forgotten is all the ancillary costs. If they do something foolish like cashing out an IRA to divide it, the taxes will be huge. There will be lots of costs to be divided and if they do it wrong, it can be very expensive. If there's a lot of money at stake, it's worth talking with a tax advisor before agreeing to anything so they understand the tax consequences of any action.