All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad,
, is His slave and Messenger.
First of all, we caution you to repel Waswaas (obsessive whispers) and endeavor to get rid of them; the cure for Waswaas is to disregard it and not think about it.
As regards your question, you are not obliged to make up any of those days which you doubt their validity as in principle your fasting is valid and doubting an act of worship after having completed it does not affect its validity.
With regard to swallowing phlegm deliberately, whether or not it invalidates the fasting, then there is a difference of opinion about it. Shaykh Ibn ‘Uthaymeen,
, is of the view that swallowing phlegm does not invalidate the fasting.
It appears that your question is a result of the Waswaas which you suffer so you should avoid this Waswaas and disregard it.
For more benefit, please refer to Fatwa 185033.
Allaah Knows best.