You will have to use RichText methods which are unfortunately undocumented ATM.
Anyway, the idea is that RichTxt is an array of "parts". Part can either be a paragraph or a table. If it is table, then each of cells is another RichTxt recursively. Difference between RichText and RichTxt is that RichText contains paragraph styles too, so that way they can be shared between top-level paragraphs and paragraphs in the table (RichText is derived from RichTxt).
Now for your needs, you will need
RichTxt::GetPartCount to get the index of the last paragraph (-1)
RichTxt::IsPara to check that it is a paragraph
RichTxt::GetPartLength to check that is empty
RichTxt::RemovePart to remove it