Both get you online from the moment you land. Which one suits you depends on how many of you are travelling, and how much you want to carry.
Travelling on your own, or as two people with your own phones: an eSIM is simpler. Nothing to collect at the airport, nothing to charge and nothing to post back, and each phone has its own connection.
A family or group that wants to share one connection, or someone who needs a laptop and a tablet online all day: a pocket WiFi can make more sense, because several devices connect to it at once.
An eSIM is a SIM built into your phone. You buy a plan, scan a QR code at home on wifi, and the plan sits beside your usual SIM as a second line for data. It starts the first time it connects in Japan.
A pocket WiFi is a small rented router. You collect it at an airport counter or have it sent to your hotel, connect your devices to it over WiFi, and return it at the end of the trip, usually at the airport or by post.
An eSIM is one payment for the data you choose. JumboSIM's Japan plans:
A pocket WiFi is usually rented by the day, often with a deposit, so its price grows with the length of the trip. For a group sharing one device, that daily price is split between several people.
Both connect through the same Japanese mobile networks. JumboSIM's Japan plans use NTT docomo, Rakuten Mobile, KDDI/au and SoftBank, so you have signal across the cities, along the rail lines and in most places travellers go. Signal can thin out deep in the mountains and on remote islands; save offline maps before a hike.
An eSIM needs a phone that supports eSIM and is not locked to a carrier. Most phones sold since about 2019 support it. The phone check takes a minute. A pocket WiFi works with any device that has WiFi, which is its advantage for an older phone.