Think the only way this works is to have a 3 individual parties holding power, with some reason to cooperate, and other reasons to work together. Splitting power is the only way this works, and there has to be some incentives to get people to work together most of the time. For example, there has to be some sort of checks and balances to power, which can be performed by PCs in game, as this is a LAWFUL and GOOD country where coup de'tat can't really win.
So there has to be some form of INTER-dependency for all major government factions to survive. Like, a circular dependency between Courts, Ministry, Militia, so while they can "fight" each other, they also need to cooperate to some extent, or each has internal problems.
For example
Militia might need funding from the Ministry to make payday.
The Ministry needs the Courts to support their legislations and laws.
The Courts need the Militia to run the jails and keep order.
The PDs might be dependent on the Ministry for food and logistics, the Court to judge law in the country, and the Militia for special investigators, since the PDs are good at fighting, but not finding criminals.
Everything should be a balancing act, and doing things should have CONSEQUENCES.