It is a necessary condition of the sacrifice that the animal be slaughtered by a Muslim with the intention of offering a sacrifice (udhiyah); it is not sufficient to slaughter it for the meat.
Al-Nawawi (may Allaah have mercy on him) said in al-Majmooâ (8/380): The intention is a condition of the sacrifice being valid.
There is nothing wrong with buying the animal in the manner described in the question, so long as the worker slaughters it with the intention of offering a sacrifice. That is if the worker is a Muslim; otherwise one of you should slaughter it, then the worker can cut it up.
Shaykh Ibn âUthaymeen (may Allaah have mercy on him) said in al-Sharh al-Mumtiâ (7/494):
It is not correct to delegate the slaughter of the udhiyah (sacrifice) to a kitaabi (i.e., a Jew or a Christian), even though meat slaughtered by the People of the Book is halaal. Because slaughtering the sacrifice is an act of worship, it is not correct to delegate it to a kitaabi, as a kitaabi cannot be involved in acts of worship that draw the Muslim closer to Allaah, because he is a kaafir (disbeliever) whose worship is not accepted. If his acts of worship are not valid when done on his own behalf, they cannot be valid when done on behalf of another. But if a kitaabi is delegated to slaughter regular meat for eating, there is nothing wrong with that.
And Allaah knows best.