First things first: start with this, and it will explain the basic concepts:
Next, take a step back. a device type handler is code that allows SmartThings to process messages received from a specific device, or from the cloud service. And to format messages to be sent back.
But none of this works unless there is an existing method of communication.
with zigbee or Z wave devices, there is a radio inside the smartthings hub which can receive messages. And the hub itself can process those messages from some of those devices without checking with the SmartThings cloud. Direct integration. Those are the only ones which can work if the Internet is down.
Many other devices, including, I believe, the Wemo devices, rely on integration which requires the SmartThings cloud to be available. That means no Internet, no messages get passed. It won’t matter what format they are using. There won’t be any way for them to reach the hub in the first place.
So if your goal is a rule that will work when the Internet is down or when the SmartThings cloud is not available, I don’t think you can use a WeMo device at all. You can probably set up communication that doesn’t use IFTTT, but it’s still going to require that the Internet be functioning. That’s because even when the integration itself is over the local area network, because of the processes those messages has to run in the cloud. This is true, for example, of the Phillips hue bridge integration.
Others can comment more on the code issues that you’re seeing, but I do think you need to first find out if the message processing can run without the cloud to see if your goal can be accomplished.