9 hours is not
necessarily too long for a 4 month old pup, as long as it has the right environment.
Our pup Samantha has been home 9 to 10 hours a day since she was 10 weeks old. She is a very happy and well-adjusted dog
The key to leaving dogs alone this long is to set them up with a puppy-apartment instead of a standard crate. For Sam, we set her up in a half-kitchen area, gated with baby-gates. She had her crate (left open), food/water, play area, and potty area with potty pads. She is now 6.5 months old, able to use potty pads when alone, able to ask to go outside when we're here, and is a very social pup with lots of personality
At around 4 months old we started giving her more and more freedom (extending the gate to the full kitchen, then the hall, then one bedroom, then two bedrooms, and then the living area), and now at 6.5 months she has the whole apartment when we're gone and she's a very good girl.
I did see you chose an older dog and congratulations on your choice! But I just wanted to throw this information out there because I have a bit of a prickly side of me when people start saying "You can't leave the puppy home for that long." No, you can
leave it home for that long, you just have to have the right set-up and be willing to put in the time before and after work to ensure the dog is properly trained and socialized.