Well, how was it solved in other industries? Licenses and norms. In the construction industry you can't just build a house. You have a pile of norms and regulations you have to comply with. Today anyone can open a website and start taking passwords.
I'm not looking forward that but do you have a better solution? The way the industry currently works is unsustainable. And I am not even talking about privacy invasion.
Because if you build or design the smallest house improperly, it could collapse and kill people. If you build a crappy WordPress site nothing of similar consequence will happen.
Not sure about other parts of the world, but here in BC we do have licensed Software Engineers for these purposes. Most software developers aren't licensed though.
I'm not looking forward that but do you have a better solution? The way the industry currently works is unsustainable. And I am not even talking about privacy invasion.