Do you have to be a great programmer to develop a game engine?
Absolutely not. Don't let its complexity fool you. If you can develop a simple game, you can develop a game engine. The one thing you need is perseverance. That is it.
I am not a great programmer. As a matter of fact, if I would go to an interview today, I would completely fail any whiteboard programming question. I am not an expert in OpenGL either. And many people who write shaders in Shadertoy know more about computer graphics than I do.
Don't think I'm being humble. I'm being truthful. I am not an expert in C++. I am not an expert in OpenGL. But I am good at not letting a problem go until I find the answer.
The only quality you need to develop a game engine is perseverance.
Don't listen to naysayers. To them everything is impossible. If it were left to them, humans would still be living in caves.
So listen to me, you don't need to be great at anything. You just need to be unstoppable in your pursue.