Back when I sold Indonesian domestic flight tickets to international visitors, I used to recommend a minimum of four hours when changing from a domestic flight to an international flight in Jakarta.
Risk factors include:
- Late arrival of incoming domestic flight
- Time needed to change terminals
- Minimum check in time for international flight, typically 90 or 120 minutes these days
- Time needed to pass through immigration and customs, then get to the departure gate. (The terminals are much bigger these days).
I would also recommend booking one flight before the one you think arrives early enough. Then, if the flight gets delayed or cancelled at the last minute, you still have time to do something about it.