Some quick search resulted in this performance benchmark. ctypes does not appear to be slow in any way according to this benchmark:
As I understand you need to store how conversation will be handled. For storing such things you can design you bot over state mechine and store transitions: state_from, condition/event, state_to. And then per user store conversation current state. https://cai.tools.sap/blog/finite-state-machine/
So after adding next_qestion_id, as you mentioned in your question, to you design is trully correct way to handle your requirements