One should definetely consider the opportunity cost of taking matters into their own hands. However, I think the example is way over-the-top because of some reasons (most already stated by sibling comments):
* Not sure how many programming contracts can sustain a $500 hourly rate for long. If you can charge that, but can realistically only book 10% of the 'available' time, then your calculation should really be using $50, not $500.
* Example makes sense only if you're 100% booked all the time, with no spare hour here and there. If you have any sort of spare whatsoever, you can sell your unused production capacity to yourself at cost price.
* Even if you're 100% taken, not all consultant time is billable time. So that will already reduce your estimate by about 50% or so alone.
* Managing stuff takes time (and is a common full-time profession). Your example didn't account the time you will take setting up whichever third party solution you choose. Unless you have hired someone who you can just take five seconds to say 'get me set up on X and tell me when you're done' (and can be trusted to do it right without taking time to supervise/course-correct), you will perform work in setting up the platform. This work may very well take a non-insignificant fraction of the time you would take by not outsourcing, which you didn't consider in your calculation.
You may very well really hate setting up servers, and gladly pay a large sum to not do it. But then you're really paying to avoid pain, and the whole opportunity cost argument you made may be a rationalization.