Those were just repaying the loans, having a stake in a company is completely different. It's not hard to push that further and in more creative ways too.
Even better, this is a policy that has been done by multiple Presidents. All you need know is an executive willing to do it as it's clearly in the President's power to dictate commerce if they can force the federal government to take equity in various companies at any time (even better if said company relies on US welfare to exist).
I don't see this as a good analogy, because the financial crisis bailout appeared to save the companies from shuttering, which is not what happened under the current admin.