For this type of coding questions, you’re more likely to get input by asking in the WooCommerce Developer Slack or Advanced WooCommerce Facebook group. As those communities are both frequented by developers (including our own).
If you decide to use the Memberships plugin, the developer of that plugin did make a guide on adding custom endpoints with their plugin:
https://www.skyverge.com/blog/modifying-woocommerce-memberships-member-area/