In pos.order table "id" is the unique identifier for orders. I think you can simply fetch the same from that table. Please try with below:
1- Go to addons/point_of_sale/static/src/js/models.js
2-Append below code there:
{ model: 'pos.order', fields: ['name'],
loaded: function(self,orders){ self.order = orders[0]; }, },
3- Inside that template, Find the line - "Shop: <t t-esc="widget.pos.shop.name"/><br />"
4- just add the below the following line:
Ticket :<t t-esc="widget.pos.order.id+1"/><br />
----OR----
1- Go to addons/point_of_sale/static/src/xml/pos.xml
2- Find: <t t-name="PosTicket">
3- Inside that template, Find the line - "Shop: <t t-esc="widget.pos.shop.name"/><br />"
4- just add the below the following line:
Ticket :<t t-esc="widget.pos.pos_session.sequence_number++"/><br />