Hello and welcome to the forum. That's a really great question and we appreciate your asking it. It's most unfortunate that a surgery we undergo to help us can also have unintended consequences as well. Ankle surgery and a fused ankle can indeed impact knees as you know. From this article: Ankle fusion is well-known for complications such as off angles, poor alignment and deformity, nonunion, and arthritis in the surrounding joints. Altered gait or abnormal walking pattern is typical with an ankle fusion. And of course, activities like jogging or running will never be the same if even possible. https://eorthopod.com/news/long-term-effects-of-complications-after-ankle-surgery/
As to the knee replacement having issues also due to the ankle fusion, please talk to your surgeon. Misalignment would still be an issue and I certainly talk to your doctor about the risk of failure of the knee replacement. However, if you are in chronic pain and not able to live your best life, it may be worth taking the chance. Let us know what your doctor says.