Cloud-edge hybrid systems are known to support delay-sensitive applications of contemporary industrial Internet of Things (IoT). While edge nodes (ENs) provide IoT users with real-time computing/network services in a pay-as-you-go manner, their resources incur cost. Thus, their profit maximization remains a core objective. With the rapid development of 5G network technologies, an enormous number of mobile devices (MDs) have been connected to ENs. As a result, how to maximize the profit of ENs has become increasingly more challenging since it involves massive heterogeneous decision variables about task allocation among MDs, ENs and a cloud data center (CDC), as well as associations of MDs to proper ENs dynamically. To tackle such a challenge, this work adopts a divide-and-conquer strategy which models applications as splittable into multiple subtasks, each of which can be completed in MDs, ENs and a CDC. A joint optimization problem is formulated on task offloading, task partitioning, and associations of users to ENs to maximize the profit of ENs. To solve this high-dimensional mixed integer nonlinear program, a novel deep learning algorithm is developed named Genetic Simulated-annealing-based Particle swarm optimizer with Stacked Autoencoders (GSPSA). Real-life data-based experimental results demonstrate that GSPSA offers higher profit of ENs while strictly meeting latency needs of users’ tasks than state-of-the-art algorithms. Given the same number of iterations, GSPSA is able to solve problems whose size is 50% larger than that of those solved by peers.