No, the 3.5" or 2.5" HDD requires little power although they do need a little more power than ssd which has no spinning parts.  you do not need to worry about power for the hdd. it sounds like your old hdd is 3.5". you can install that in the external 5.25" bay using a Dell 3.5 caddy.  I think the 5040 MT looks like 7040MT in this video Dell Optiplex 7040 Teardown - YouTube   Dell OptiPlex 5040 MT vs. Dell OptiPlex 7040 MT Comparison (hardware-corner.net)
I have an Optiplex 5040 with SSD and Optical drive. I have a HDD from an older machine that I want to install in the drive bay. There are extra SADA sports on the board and 2 power connectors on the power cable. Looks like they are for additional SSD drives for another smaller bay. Does the HDD drive require too much power. Had some CPU fan issues when I connected the HDD with the existing power cable Thanks N
Optiplex 5040 MT add HDD