Investigate the theoretical underpinnings of geotechnical engineering pertaining to the design of deep foundations for tall structures. Discuss the principles governing the selection of appropriate foundation types, such as piles or caissons, and the considerations involved in ensuring stability and load-bearing capacity in varying soil conditions.