Firstly, attaching the EPDM roofing membrane directly to a brick face wall is inappropriate. As the brick and mortar are porous, the water will eventually infiltrate it causing dampness. Separating the glued EPDM from the brick over the seasons, leading to your roof repair.
To repair it, pull the EPDM roofing membrane back from the wall. Apply a plywood sheath of 3/8″ to the brick wall by drilling or pinning it. Next glue the plywood and the EPDM roofing membrane, and reattach the membrane 2″ above the new sheathing. Terminate with a water cut-off and apply a gum lip flashing over the EPDM membrane. Now covered the woodwork, and caulk well with a Polyurethane Sealant.
It’s common for roofing contractors to install double gum lip flashing. As it prevents leaks when the rain soaks the brickwork.
Lastly, the membrane termination bar in the photo is not a good final seal. As it’s only good for holding the membrane up, allow the new bonding adhesive and plywood to take its place.