I don't overhead press at all because it kills my shoulders whether the bar is in the front or back. Isolation workouts like lateral raises, bent over lateral raises and front delt raises. These all are great for stimulating shoulder growth and for helping with shoulder health.
I don't think anything else really hits the middle delt head better than lateral raises.
i'd recommend starting light with 3-6 sets of 15-20 reps working your way up to heavier poundages and decreasing reps. Going under 10 reps often is probably not the greatest idea if you have a shoulder injury.
anyways, bent over lateral raises obviously hit the rear delt but these are also hit when using good form and range of motion with most rowing movements.
and fuck it man i mean if the only bench pressing you can do is on a hammer strength machine then i'd just stick with them. No one ever said you can't grow with a HS machine.
What i did with my bench press when i hurt my shoulder is i dropped the weight to something easy (205lbs)that didnt hurt at all, something i could easily do sets of maybe 15 with. But i did 3x12 and every week i added 2.5 lbs to each side of the bar while keeping about 3x10-12 and worked my way back up to working out with heavier weight. You can maybe try this?