Off the top of my head, I thinkbelieve the firstearliest appearance (in real world time we saw) of a female officer in the post of chief engineer on a Starfleet vessel was in TNG S01E03, "The Naked Now", which first aired on the 5th of October 1987.
Prior to Geordi La Forge becoming sole chief engineer of the Enterprise-D at the start of seasonSeason 2, the ship had several chief engineers in rotation, one of them being Lieutenant Commander MacDougal. She held that position in 2364, in-universe.
She's visible a few times in the video below (a clip from "The Naked Now"), and has a line of dialogue at around the 0:45 mark.