> In general I don't believe I can catch a (legitimate) felony for locking myself in the bathroom and flushing the toilet during a police raid.

Most juristictions have a duty to preserve or not to spoil evidence once you are clearly detained or a search is clearly imminent (i.e. the police are knocking on your door), or when litigation can be reasonably anticipated. Behavior like locking the door and then burning/shredding papers, wiping a phone, or even flushing a toilet can absolutely be considered destruction-of/tampering-with evidence past that point, even (and especially) if the evidence is impossible to recover.