If you believe this is preferable to a system where knowledge is established before appointing the person, then we're not going to have much common ground.
I'd invite you to read https://www.theguardian.com/us-news/ng-interactive/2026/oct/... for a look at Louisiana's justice of the peace system, whose justices only need a high-school diploma.
IMO a law degree is the absolute bare minimum for any kind of judicial or prosecutorial role. It's bad enough cops aren't expected to know the law. How can anyone justify a judge with fewer qualifications than a bootcamp grad in a software role?