I think that the context of
Ecclesiastes 7:1 is referring to the death of a righteous individual; not that the same could be said of everyone, for it is obvious that such is not the case for the "rich man" whom Jesus clearly portrayed as an unrighteous man.
I also believe that Jesus' telling of the events surrounding the fate of the unnamed rich man and a certain beggar named Lazarus, should not be construed as a depiction of a historical event but was, in fact, a parable which evidences the eventual fate of the righteous as opposed to the unrighteous. Jesus never spake openly to anyone except His chosen disciples; and seeing that in this discourse He was conversing with the Pharisees, then how could it be interpreted otherwise?