Gave it another try adding Milan and Khdarr to the cabinet (replacing Lorkas and Mirielle), and got 27 votes a different way. This time nobody pledged for Lukamir, but Muistis and Rejit went for him in the election. Not sure what changed their opinions compared to the previous run. Unfortunately neither of them give me quests, so there isn't a quick fix that way. I still think 27 is probably beatable, but it seems pretty hard without knowing which policy decisions are going to please which electors. Before I try this again, I'll probably want to do a max media run where I just imperial poll every turn to see what impact my main storyline decisions are actually having (particularly on the electors I can't win with quests)