I just hacked the above code to use a wx.TextCtrl instead of the RichTextCtrl and the red waved underline does appear. However, the amplitude of the waves is very small so, even if I could get it to work in a RichTextCtrl, I don’t think the effect would be sufficiently obvious.
I think the example given by @komoto48g using the StyledTextCtrl in https://discuss.wxpython.org/t/spell-check-as-you-type-with-pyenchant/35585 looks better, so I will investigate using an STC instead.