Professional shoe repairers do glue soles on shoes without extra stitching, nailing or stapling.
They use soles which are made for the purpose and are both heavier of body and more resistant to abrasive wear than dime-store stick-ons.
They use motorized scratch wheels and belt sanders to prepare both the shoe bottom (after stripping the old sole off) and the replacement sole. They then use a special glue -Barge Cement is the leading brand almost to exclusion of any other- and heavy pressure to fasten the sole and shoe for the long haul. To clean up the job, they grind back any overhang of the sole on the edge to make a neat, nearly invisible repair
All these supplies are available from internet suppliers and if you have a decent mechanized home shop, with some practice and the willingness to make your own jigs as necessary, it won't cost you much more to repair your own shoes than to take them in.
And you will have a lifetime supply of Barge Cement.