The Jargon File (version 4.4.7, 29 Dec 2003):
deep magic
 n.
    [poss. from C. S. Lewis's Narnia books] An awesomely arcane technique
    central to a program or system, esp. one neither generally published nor
    available to hackers at large (compare black art); one that could only
    have been composed by a true wizard. Compiler optimization techniques and
    many aspects of OS design used to be deep magic; many techniques in
    cryptography, signal processing, graphics, and AI still are. Compare heavy
    wizardry. Esp.: found in comments of the form ?Deep magic begins here...?.
    Compare voodoo programming.
The Free On-line Dictionary of Computing (30 December 2018):
deep magic
   [possibly from C. S. Lewis's "Narnia" books] An awesomely
   arcane technique central to a program or system, especially
   one neither generally published nor available to hackers at
   large (compare black art); one that could only have been
   composed by a true wizard.  Compiler optimisation techniques
   and many aspects of OS design used to be deep magic; many
   techniques in cryptography, signal processing, graphics, and
   AI still are.  Compare heavy wizardry.  Especially found in
   comments of the form "Deep magic begins here.".  Compare
   voodoo programming.