Who is the Technical Leader or who are the Technical Leaders?
This is the important question. Whomever that is is the one who gets to make the final decision on technical decisions. This can be a manager, senior engineer, the program manager (PM), or even the customer in some cases.
In some cases there are multiple people who are the technical leaders, for these cases an Engineering Review Board (ERB) is recommended. Each item that needs a technical decision is sent to the ERB where the pros and cons of the different options are briefly discussed (any lengthy discussions should have happened before the ERB) and then each technical leader casts a vote in a yay or nay style.
If your PM is not the technical lead then you need to have a talk with the technical lead since the PM is overstepping their authority. Now if you are the technical lead then you need to have a private talk with them where you two clearly define who is responsible for what and possibly deinvite the PM from all further technical meetings that do not touch on something the PM is responsible for.
Now the rest of this answer assumes the PM is your technical leader:
At the end of the day technical leaders are the ones who get to make a decision even if it one that you disagree with. Leaders make bad decisions all the time. Sometimes it works out, they were able to see something everyone else could not, and sometimes they really had no idea what they were doing. Good leaders will take input from people more knowledgeable than them and weigh the pros and cons, and be able to explain why they are going to make the decision they are going with even if it is not the popular decision. Unfortunately your PM does not appear to be this.
Working with Authoritarian Leaders
Your PM follows an authoritarian type of leadership. When working with these types of people, directly confronting them and saying through actions or words they are wrong is only going to make things worse, since it is a challenge to their leadership. One thing worse than that is to do it in a public setting with other people present like a meeting that they are leading. They tend to not care about what others think and expect people to do what they are told. So when someone does not comply it is a threat that undermines them, and they feel compelled to squash it (in some cases by any means necessary) otherwise anarchy will take over.
As such a better approach working with an authoritarian leader is to talk things over in private. Do not mention any idea you have that is better than theirs. Instead walk the authoritarian leader through their own idea, the risks and challenges it has. Ask them questions about their idea in a way that shows interest, but at the same time causes them to think through to bad parts of the idea. It is far better when working with an authoritarian leader if they realize what is wrong with their approach than you telling them it directly.
Once they realize the problems with it, then they will be far more receptive to ways of fixing it, at that point you still do not want to give your solution. Only give some initial thoughts that could form the groundwork for your solution. Ideally the authoritarian leader will take your initial thoughts and come with the solution themselves. At that point the idea is their idea and not your idea, and you praise their idea and never talk about the original idea ever again.
With all that said there are times where one should directly confront an authoritarian leader and refuse to comply with a decision they are pushing. Those times are when the decision could result in fines, jail time, lawsuits, injury, and/or loss of life. In those cases you want everything in writing, and depending on the severity or risk may even need to be escalated to higher levels of leadership.
Conclusion
In the end it does not matter who is right. What matters is who gets to make the final decision. Make sure your leaders have as much information as possible to make an informed decision even if they end up choosing something you disagree with. And when they make a decision you do not like, diligently work on it in such a way that when things fail the fallout/damage of it is minimized and don't say things like "I told you so."