I've edited the above diagram to make it as silly simple as necessary using a single pole relay.
Of course, the device @gunrunnerjohn recommended, does this quite well in a ready to go package:
gunrunnerjohn posted:One of these will insure bounce-free activation for insulated rails.