Under version 4, the same ‘public’ middleware exists, but it looks for the index page template only within the Strapi node module (in the folder packages/core/strapi/lib/middlewares/public). Sadly it looks like this template wasn’t built to be customised - i.e. you can’t just configure the location of a different template. However, you can add new routes into Koa, that replace the default routes. This is used, for example, in redirecting requests for the home page to return the admin page (admin-redirect | Strapi Documentation). If you want a custom home page, instead of using ctx.redirect you can provide your own Koa handler that returns your custom page as the response.
I suggest you look at the code on Github to see how the default home page is created and returned, to give you ideas about how to build your own home page.