Who to contact when handling editor is anonymous and manuscript is delayed?
Is it an appropriate approach for associate/handling editor to hide the identity 
  from an author? 


This question has been discussed extensively in the question you linked. Whether it's "appropriate" is a difficult question, but it's not entirely uncommon and I am not sure why it would be an ethical problem. Personally, I prefer transparency over information hiding, but there are definitely arguments in both directions (and most of the time it probably simply does not matter).


  Is it appropriate if I write email directly to Editor in Chief?


Sure, why not? 5 months is a fairly long time for a minor revision, and sending an email to a person concerning an official role that (s)he voluntarily took over seems almost always ok. Whether this will change much is a different question, but it's worth a try.


  if yes, then how should I compose my email? 


Short and respectfully. Avoid being combative, avoid assigning blame, and don't ask who the handling editor is so that you can bug her or him yourself. Briefly state that you have submitted a minor revision for the manuscript XXX on date YYY, that you are wondering what the cause of the delay is, and want to inquire whether a notification date can already be foreseen.