Is it fine for a child to refrain from praying for parents who are Munafiq or Fasiq, or for parents who have been very stressful during their lifetime due to being toxic, troublesome, and unjust?
The right of the parents remains great on their children no matter how their children were treated by them. Children must be nice to their parents even if the children think that their parents were bad parents. Children must always be grateful and good to their parents and pray for them. Allah (SWT) orders us in Quran to nicely treat nin believer parents even if they try to make you a polytheist وإن جاهداك لِتُشرِكَ بي ما ليسَ لكَ بهِ علمٌ فلا تُطِعهُما وصاحِبهُما في الدنيا مَعروفاً (If your parents strive to make you a polytheist without knowledge from you, then don't obey them, but treat them in this life nicely.) Sura 31, Verse 15.
Wassalam.