To answer your question the task needs to be clarified and detailed a bit more.
Being able to assign only appropriate milestones, you'll have to enforce input order:
- component
- milestone (from filtered list)
So you'll need to conditionally hide the milestone input field, until a component has been selected. After selecting the component you'll need to fetch an updated milestone list. All that has to be done repeatedly, if you change the component before submitting the new ticket. And to not leave the /newticket page you'll even need to do page updates by back-ground requests (ajax style) that requires JavaScript.
You did not tell anything special about statistics, so I assume it could be done by a custom report the common way.
I know of a Trac plugin that is getting close: TracTicketChainedFieldsPlugin, but might still need some work to be done.