Shifting tasks from the cloud to the edge Internet of Things (IoT) devices facilitates real-time decision support, yielding rise to the emerging edge-hub-cloud computing architecture. However, as edge devices tend to be more vulnerable to errors due to environmental/technological factors, the reliability of the application can be compromised due to this shift. We propose an optimization and design exploration framework for task allocation which maximizes reliability while respecting latency and energy constraints in computation and communication tasks, as well as memory computation constraints. It considers varying tasks' vulnerability factors, per possible executing device, and allows for different task re-execution reliability approaches based on full or selective dual or triple re-execution of tasks. We validate and showcase the effectiveness of our approach through a real-life case study for power tower/line inspection using UAVs (Unmanned Aerial Vehicles). Evaluation results show that our framework is capable of optimizing the overall reliability of the targeted application while satisfying strict latency, energy, and memory constraints, allowing the designer to explore different reliability approaches in a short period of time.