How to determine the relative contribution of resonance structures when different rules give contradictory outcomes?
The Rules

Actually the rules for determining the relative stabilities (more accurately, contributions) of resonance structures do have their own priorities. Here is one version of them, with descending order of importance listed below (as is indicated by the bold words). The rules can be found in common organic chemistry textbooks (like [1], also supported by [3]).


  
  In any case, the more the octet rule is fulfilled (for appropriate atoms), the better.
  Resonance structures with charge separation are usually higher in energy than those in which charges can be neutralized, unless rule 1 is not obeyed.
  If charge is separated, then the best structure is consistent with the electronegativity of the atoms (e.g., a negative charge is best on the most electronegative atom).
  The more and stronger the bonds, the better. Adjacent atoms should not have the same sign of charges.
  


Examples

The first rule is undoubtfully the most important. The example of $\ce{CH2^+-O-CH3 &lt;-&gt; CH2=O^+-CH3}$ is already mentioned. Here I would like to provide an example to justify the importance of rule 1.


  Consider the Lewis acids $\ce{BX3}$ where $\ce{X}=\ce{F},\ce{Cl},\ce{Br}$. We know that $\ce{BF3}$ is the least Lewis acidic despite the fact that $\ce{F}$ is the most electronegative. This fact can be explained by considering the resonance structures $\ce{X2B-X &lt;-&gt; X2B^-=X+}$. According to rule 1, the second resonance structure is more important, so the electron deficiency of $\ce{B}$ is determined by the orbital overlapping between $\ce{B}$ and $\ce{X}$. Therefore, since $\ce{F}$'s $2\mathrm p$ orbitals interact with $\ce{B}$'s best, $\ce{BF3}$ is the least Lewis acidic.


Another interesting example illustrating the relative importance of rule 3 and 4 comes from Grützmacher's work[2].


  The phosphaethynolate anion $\ce{OCP-}$ may attack $\ce{TMSOTf}$ using $\ce{O}$ and $\ce{P}$. At 298K the product is $\ce{TMS-O-C\bond{3}P}$, and at 318K the product is $\ce{TMS-P=C=O}$. To account for this, let's analyze $\ce{OCP-}$'s resonance structures:
  $$\ce{P\bond{3}C-O- &lt;-&gt; O=C=P-}.$$
  The latter has stronger bonds and the former has its negative charge on a more electronegative atom. According to rule 3, the former dominates (actually a ratio of former vs latter 40:52), hence at ambient temperature $\ce{O-}$ attacks more quickly to obtain the kinetic product, while $\ce{TMSPCO}$ is the thermodynamic product.


Theoretical Justifications

You can find theoretical justifications using Hückel Theory as always. I will not show this here because it may be to tedious to do the calculations. However, you can read this article for more information J. Chem. Educ. 2007, 84, 6, 1056.

Ref.

[1]  Grossman, The Art of Writing Reasonable Organic Reaction Mechanisms, Springer, 2002.

[2] Grützmacher et al., Dalton Trans., 2014,43, 5920-5928.

[3] Humbel, J. Chem. Educ., 2007, 84, 6, 1056-1061.