Personally, if I were branching out from 9mm, it wouldn't be to 40 or 45. All three are basic self-defense cartridges, and in that role they are all basically interchangeable. Branching out to 40 or 45 would do little except to add another, more expensive caliber that you have to stock and keep track of.
Personally, I would look to 22 or 10mm. Both add a dimension of "hunting and survival utility" beyond a pure self-defense tool. And they are both distinct enough from 9mm to give another level of shooting fun.
For pure self-defense, caliber matters
less than you think: