Two men will face court on Friday over the alleged assault of an off-duty police officer who was repeatedly kicked and punched in the head in a shocking attack in Sydney’s inner west.