Thank you for your question. Mawla means master and it is meant differently when referring to Allah then it is when referring to any other personality. Master when referring to Allah means the One who completely owns the very existence of the servant. On the other hand, when referring to an Infallible (as), mawla means the person who is to be obeyed completely by the order of Allah. So there is no question of shirk here as the word is not used in the same sense.
May you always be successful