All of what you say is true, but you're not explaining how a third party can produce a functionally equivalent part for much less than what Apple sells it for.
If all you said were the only things that applied, then you might get a charge port for $5 when you are Apple buying millions to make new iDevices, $20 when you factor in Apple's warehouse storage costs and cost of capital to pay for it and then hold it for a couple of years for a repair, and maybe $30 when it's made in small quantities by the actual part manufacturer and sold into the repair parts market.
None of that explains why Apple is charging $250 for it. Only one thing explains that: massive profit margin and huge costs to discourage third party repairs.
That's the only plausible reason for the situation described in the story at the top of the thread.