Introduction: Transportation companies have increasingly shifted their workforce from permanent to outsourced roles, a trend that has consequences for self-employed truck drivers. This transition leads to extended working hours, resulting in fatigue and an increased risk of crashes. The present study investigates the factors contributing to fatigue and impairment in truck driving performance while developing a machine learning-based model for predicting the risk of traffic crashes. Method: To achieve this, a comprehensive questionnaire was designed, covering various aspects of the participants’ sociodemographic characteristics, health, sleep, and working conditions. The questionnaire was administered to 363 self-employed truck drivers operating in the State of São Paulo, Brazil. Approximately 63% of the participants were smokers, while 17.56% reported drinking alcohol more than four times a week, and also admitted to being involved in at least one crash in the last three years. Fifty percent of the respondents reported consuming drugs (such as amphetamines, marijuana, or cocaine). Results: The surveyed individuals declared driving for approximately 14.62 h (SD = 1.97) before they felt fatigued, with an average of approximately 5.92 h of sleep in the last 24 h (SD = 0.96). Truck drivers unanimously agreed that waiting times for truck loading/unloading significantly impact the duration of their working day and rest time. The study employed eight machine learning algorithms to estimate the likelihood of truck drivers being involved in crashes, achieving accuracy rates ranging between 78% and 85%. Conclusions: These results validated the construction of accurate machine learning-derived models. Practical Applications: These findings can inform policies and practices aimed at enhancing the safety and well-being of self-employed truck drivers and the broader public.