Foodborne illnesses resulting from the proliferation of excessive harmful microorganisms in foodstuffs pose a significant threat to human society. Sampling inspection for the quantity of pathogenic microorganisms within food products is a productive approach to mitigate the incidence of foodborne diseases. A recently developed generalised variable quick-switch sampling system (GVQSS) is an efficient sampling technology to verify harmful microorganisms in food. However, the rule-switching mechanism in the GVQSS is too simple, making it inflexible and may limit its applicability. To break through this limitation, we apply the Markov chain and mean first-passage time theory to develop two types of variable flexible sampling systems (VFSSs). Through a series of investigations, the various types of VFSSs exhibit different strengths with a higher sensitivity to detect quality degradation and cost efficiency. These findings can expand the applicability of the existing GVQSS and improve efficiency and flexibility when food practitioners conduct sampling inspections for food quality and safety in practice. Two real-world cases are illustrated to demonstrate the practicality of the proposed method.