Definitely not legal in many of the large economies any more. France, Spain, Italy, Portual, Belgium and Ireland have have all adopted so called "Right to disconnect" laws. In Germany it's not categorically outlawed but employees have no obligation to respond off-hours.
https://www.washingtonpost.com/business/2023/02/01/right-to-...
May of course be the case that some companies skirt the rules because they are relatively new and awareness might not be there.