Directive 2015/637 doesn't set any rules regarding who you should contact and doesn't constrain Poland's ability to assist you in any way. What it does is create an obligation for Portugal not to turn you away in case you are facing one of the specific emergencies listed in article 9 and you decide to request their assistance. Presumably, the Polish consulate in Jakarta would also help you if you are able to contact them but that's not a matter for EU law.
If you do request assistance from the Portuguese embassy, they should contact the Polish ministry of foreign affairs as soon as possible and coordinate with them. If Poland prefers to take over (e.g. send someone over from Jakarta), they can do so and Portugal would relinquish the case (article 3). In the meantime, they are required to help you as an “unrepresented EU citizen” as defined in article 6.
Another thing that explains the apparent discrepancy is that Directive 2015/637 only covers specific emergencies (being arrested, being the victim of a crime, serious accident, etc.) The Polish consulate in Jakarta would be responsible for everything else (e.g. renewing your passport).
In general, it makes more sense to contact the Polish consulate directly whenever possible. EU consular assistance is designed to help specifically in situations where that might be difficult, including evacuation in case of crisis.