You want to think you can work out poor mechanics on the range, but things such as poor stability, range of motion or muscle function play a key role in crappy ball-striking.
You need stable legs to make a powerful swing, but lower-body stability doesn’t require hours in the gym doing Olympic lifts or other complicated exercises. You can build a sturdy platform to swing from in your lounge room.