One of the consistent messages that you hear from the manufacturers of vaccines and the developers of vaccines is the need to find manufacturing facilities that meet best practices, including the highest standards of safety and regulatory compliance. This is something that would have to be taken very seriously.
If there were a TRIPS waiver and a free-for-all for production, then I suspect there would be concerns about this. Presumably the production would be in the countries offering the waiver, however, so the risks would be taken by the population in the countries offering the waiver and that may be a very unsatisfactory situation from a health point of view.