is it possible to create a simple program to toggle the personal hotspot on/off?
No. Personal Hotspot is a user-level feature with no API surface.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"