TL;DR
If you want to score things, you need to convert to a numerical or ordinal value to perform a comparison. However, part of the challenge is that you are using the wrong tool to compare features in multiple dimensions. Tee shirt sizing is a good relative comparison for level of effort, but isn't useful for comparing multiple criteria against each other with any granularity. You should use Theme Screening or Theme Scoring instead.
Theme Scoring
In general, when trying to rank features you want to use Theme Screening or Theme Scoring in order to compare features across dimensions. Theme Scoring uses two axes, where the X-axis is a set of epics or themes, and the Y-axis is a set of criteria. You can then tweak the relative weights of the criteria based on project goals (e.g. Project Success Sliders), or leave all the weights the same if you don't want to differentiate.
In any case, you then assign a rank of 1-5 to each criteria for each theme or epic, and a weighted score will emerge. If you have a large number of criteria, you almost always need to adjust the weightings in order to have a truly ordered set, but sometimes it's enough just to place your themes into a set of buckets (in this case, buckets #1-5) for later refinement.
Example

In this example, your Drupal, Front End, and Middleware themes are scored against effort, risk, and reusability. I used 1 as a "bad" score, and 5 as the best possible score; all criteria were equally weighted. Based on this example assessment of the criteria, we end up with a ranked priority of:
- Middleware
- Front End
- Drupal
Obviously, your assessment and rankings may differ, but this gives you a solid example of how to filter and assess different aspects of a project, assign numerical weights to the criteria, and arrive at an ordinal ranking of the themes or epics that deliver the most value to the project.
According to the example assessment, the middleware delivers the most value, and should therefore be prioritized over other components. Pragmatically, you may not be able to deliver middleware without a vertical slice that includes both front and backend functionality, but it still helps you identify what work delivers the most bang for the buck.