Customizing overlay stats

Can I customize the data shown in bpy.context.space_data.overlay.show_stats ?

My goal is: if there are 2 selected vertices, then show the distance between them.

Same for 2 selected and parallel edges (or faces).

You can create your own script printing anything you like, with BGL as a modal operator:
(See Python template: operator_modal_draw.py)