Absolutely, an E-Bike is a tool no different to any other tool - indoor trainer, gym, a different biking discipline (e.g. MTB for a road rider). When used correctly, it can improve training out comes. Also consider training is 90% about the mindset, if an E-Bike improves the mindset, it improves the training.
Specific use cases I can think of - as you have suggested - wanting an endurance ride and having long hills meaning staying in the target zone is hard. Training in a location with windy conditions (we often have 30km/h+ winds), where busting you gut for a max speed of 20km/h does you head in no matter what the power meter is telling you.
Also consider the case where you might otherwise decide not to train today. maybe you are not feeling 100%, no sure if it is the night before or coming down with something nasty - with an EBike can head out, if you don't perk up, turn up the motor and head home. Thinking of the couple of times I have bonked - the thought of an option to turn up the power and get home is very appealing. More importantly, times I have spared myself and arrived home feeling I should have/could have put in a bit more. With an ebike, of you overcook it, you still get home comfortably.
An e-bike might allow you to train with much fitter and faster riders than you without holding them back. This may open you up to a larger group of people for training rides. The social benefits might outweight the direct training benefit.
You would need to be careful not to cheat yourself out of quality training time. Use of the assistance would need to be thought through and well planned. It could easily become an excuse.