A Captain of Engineering was a Starfleet Engineering Officer with the rank of Captain, but still serving in the Engineering Branch of Starfleet. Typically the chief engineer of a flagship, or the senior engineering officer of a shipyard or large facility.
Captains of Engineering
CaptainMontgomery Scott
Captain Thomas Riley