Is it okay for husband and wife to die in the same cave 40 years apart? Does the same point have an impact on future generations?

It depends on your local customs. If you are in the city, you can be buried in the same cave. After all, you are more open-minded, so you should ask about the rural customs, otherwise it will affect the reputation of future generations and the pointing fingers of local people. It's best to take it seriously and not be superstitious. Some things will never be known. I would rather believe it.