Given enough time, expertise and “unlimited resources” (can you say taxpayer) it has been done.
No, you're wrong, because it has to be done anew, each time, on each iPhone unless Apple rewrites the source code. If the NSA had done so, under the sharing of resources required under the DHS, they would not be doing it via court order to Apple.