Gastric mechanical stress often impacts drug dissolution from solid oral dosage forms, but in vitro experiments cannot recreate the substantial variability of gastric motility in a reasonable time. This study, for the first time, combines a novel dissolution apparatus with the design of experiments (DoE) and machine learning (ML) to overcome this obstacle. The workflow involves the testing of soft gelatin capsules in a set of fasted-state biorelevant dissolution experiments created with DoE. The dissolution results are used by an ML algorithm to build the classification model of the capsule's opening in response to intragastric stress (IS) within the physiological space of timing and magnitude. Next, a random forest algorithm is used to model the further drug dissolution. The predictive power of the two ML models is verified with independent dissolution tests, and they outperform a polynomial-based DoE model. Moreover, the developed tool reasonably simulates over 50 dissolution profiles under varying IS conditions. Hence, we prove that our method can be utilized for the simulation of dissolution profiles related to the multiplicity of individual gastric motility patterns. In perspective, the developed workflow can improve virtual bioequivalence trials and the patient-centric development of immediate-release oral dosage forms.