Maybe that's the criterion that the courts use, but that's not what protection of the laws actually means. It means protection against other persons violating you in some way. The fundamental mistake they make is in assuming that equal protection of the laws is synonymous with equal treatment by the laws. It is not, no matter how much they, or anyone else, want it to be.
In Loving, however, the antimiscegenation statute discriminated on the basis of race and the courts have held that, given the historical association between the adoption of the Fourteenth Amendment and the end of slavery...
The historical association is irrelevant, and misleading. The 14th amendment contains not one word about race, and contrary to what gets said many times, including here on this thread, it doesn't look at all as though its primary purpose was to protect blacks in particular. From reading it, and seeing its common themes, it seems clear to me that its purpose was to prevent the states from getting out of line again to the point of challenging federal authority. It's basically a "know thy place" amendment.
...they will closely scrutinize the claimed necessity of any law that discriminates on the basis of race.
There's one huge problem right there. There is absolutely nothing in the Constitution that in any way suggests that an otherwise unconstitutional law would become constitutional if someone can demonstrate a "necessity" for it. Either a law or practice is constitutional or it isn't. The old Soviet constitution guaranteed all kinds of wonderful freedoms - except that the government decided they had to suspend those guarantees out of "necessity". There's absolutely no way that nonsense should be tolerated here.
I hear what you're saying, but yours is a very novel view of the Fourteenth Amendment. As I understand it, you believe that it should be read to apply only to private conduct. Am I right?
Under your view of the equal protection clause, what would some person or entity have to do to violate it?