If you have the option of a trial period, then I don't think its unfair to try it out.
Your old dog is ok with visitors, you are reasonably sure the new dog is generally ok with other dogs.
Be aware that settling into a new home is hard even for a steady sensible dog, AND the presence of an elderly, frail dog CAN be stressful and can trigger anxiety and unfortunately some unpleasant behaviours in some dogs (they can attempt to attack the old dog, drive it out of the home or kill it. It is unusual, but it does happen).
As long as you'd be home all the time to properly monitor them through a trial period and then, presuming the trial went well, for some time to come... then I can't see a problem.
Some other things to be aware of:
If its likely you will lose the old dog soon, will you genuinely be able to cope with the new dog. If theres a possibility that you may then feel as if the new dog pushed the old dog out... or simply that you won't feel able to care for new dog.. then don't do it.
Settling into a new home is tough on any dog, you are realistically looking at this dog settling into your home that already has a frail elderly dog (Stressful) .. and then that dog passing (potentially also stressful) - will you be home to support and monitor this situation.
You may well be right that a new younger dog will perk up your older dog - i HAVE found that to be the case here on a number of occasions.
I have also found young dogs to be deeply shocked and upset when an older dog passes - we always let them see the body once they are gone, so they are not wondering where they went and if they'll return, but that can be upsetting in itself.
I think if you're fully prepared (as you can be) for all eventulities here, its not automatically the wrong thing to do. It is something I have done and many of my colleagues (all dog trainers/behaviourists like me) have done, under consideration and with care. It can work out really well!