I want to say in german something like "I will never be able to eat pig". Google translate tells me that the translation is "Ich werde niemals Schwein essen können". However, I see that there is a verb here (essen) that is stacked on top of two modal verbs (werden and konnen). Is this legal in german?
I will never be able to eat pig.
Ich werde niemals Schwein essen können.
This is a very good translation of the English sentence. However, it should read pork and Schweinefleisch.
Werden isn't a modal verb but an auxiliary. If it takes the infinitive, the result is the Futur I tense. Here the infinitive is können, a modal verb which takes another infinitive, essen. This stackup is okay.
You asked if a further stackup of modals is okay. Yes:
Sie wird warten können müssen.
She will have to be able to wait. (She will need to be patient.)
Please note the order of the infinitives is just reversed in German.
Most stacked constructions make no sense though they are okay grammatically.
Sie wird warten müssen können.
What's that even supposed to mean?
Sie wird warten wollen sollen.